hover effect FX
This commit is contained in:
@@ -27,6 +27,10 @@ public class CardDeck {
|
||||
return buildingDeck.get(era);
|
||||
}
|
||||
|
||||
public Map<Era, List<Card>> getBuildingDeckMap() {
|
||||
return buildingDeck;
|
||||
}
|
||||
|
||||
public void setForNPlayerPathTest(String path, int n) throws LoadingCardsException {
|
||||
|
||||
List<Card> tribe = new ArrayList<>();
|
||||
@@ -74,7 +78,7 @@ public class CardDeck {
|
||||
|
||||
|
||||
|
||||
public void setForNPlayer(InputStream csvStream, int n) throws LoadingCardsException {
|
||||
public void setForNPlayer(InputStream csvStream, int n, boolean shuffle) throws LoadingCardsException {
|
||||
List<Card> tribe = new ArrayList<>();
|
||||
List<Card> building = new ArrayList<>();
|
||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(csvStream))) {
|
||||
@@ -106,13 +110,13 @@ public class CardDeck {
|
||||
throw new LoadingCardsException("file not found");
|
||||
}
|
||||
|
||||
building = CardDeck.shuffle(building);
|
||||
if (shuffle) building = CardDeck.shuffle(building);
|
||||
|
||||
this.tribeDeck = tribe.stream()
|
||||
.filter(card -> card.getForMinPlayer() <= n)
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
|
||||
this.tribeDeck = CardDeck.shuffle(this.tribeDeck);
|
||||
if (shuffle) this.tribeDeck = CardDeck.shuffle(this.tribeDeck);
|
||||
this.buildingDeck = building.stream().collect(Collectors.groupingBy(Card::getEra));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user