diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/Board.java b/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/Board.java index 71a772a..764eb47 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/Board.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/Board.java @@ -74,7 +74,7 @@ public class Board { tribeDeck=getTribeDeck(nTotem); era=1; - for(int i=0;i(EventCard)x).collect(Collectors.toCollection(LinkedList::new)); } - - // TODO chiedere a ruben che cazzo sono sti metodi + /** + * Take the selected card from the upper tribe list of the board + * + * @param tribeCard is the card to remove + * @return true if succeed in removing the card + */ public boolean removeUpperTribeCard(TribeCard tribeCard) { return upperListTribe.remove(tribeCard); } + /** + * Take the selected card from the lower tribe list of the board + * + * @param tribeCard is the card to remove + * @return true if succeed in removing the card + */ public boolean removeLowerTribeCard(TribeCard tribeCard) { - return upperListTribe.remove(tribeCard); + return lowerListTribe.remove(tribeCard); } + /** + * Take the selected card from the upper building list of the board + * + * @param buildingCard is the card to remove + * @return true if succeed in removing the card + */ public boolean removeUpperBuildingCard(BuildingCard buildingCard) { - return upperListTribe.remove(buildingCard); + return upperListBuilding.remove(buildingCard); } + /** + * Take the selected card from the lower building list of the board + * + * @param buildingCard is the card to remove + * @return true if succeed in removing the card + */ public boolean removeLowerBuildingCard(BuildingCard buildingCard) { - return upperListTribe.remove(buildingCard); + return lowerListBuilding.remove(buildingCard); } /** @@ -160,7 +182,6 @@ public class Board { * - Populate the upper tribe row * */ - // TODO chiedere a che serve il secondo for a ruben public int nextRound() { lowerListTribe.clear(); lowerListTribe.addAll(upperListTribe); @@ -174,24 +195,23 @@ public class Board { } upperListTribe.add(tempCard); } - for(int i=upperListTribe.size();i buildingCards=DecksCreator.loadBuildingDeckByEra(era); + ArrayList buildingCards= new ArrayList<>(DecksCreator.loadBuildingDeckByEra(era)); Collections.shuffle(buildingCards); if(era==2) {