GameList Fixed

This commit is contained in:
rubenpirreram
2026-05-19 18:49:11 +02:00
parent 6da5670dff
commit 1d254b881c
2 changed files with 5 additions and 13 deletions
@@ -266,9 +266,7 @@ public class Game implements Serializable {
* @return a list containing clones of the upper tribe cards currently available on the board.
*/
public ArrayList<TribeCard>getUpperListTribeCards() {
ArrayList<TribeCard> cards = new ArrayList<>();
board.upperListTribe.forEach(x->cards.add(x.clone()));
return cards;
return (ArrayList<TribeCard>)board.upperListTribe;
}
/**
@@ -277,9 +275,7 @@ public class Game implements Serializable {
* @return a list containing clones of the lower tribe cards currently available on the board.
*/
public ArrayList<TribeCard>getLowerListTribeCards() {
ArrayList<TribeCard> cards = new ArrayList<>();
board.lowerListTribe.forEach(x->cards.add(x.clone()));
return cards;
return (ArrayList<TribeCard> )board.lowerListTribe;
}
/**
@@ -288,9 +284,7 @@ public class Game implements Serializable {
* @return a list containing clones of the upper building cards currently available on the board.
*/
public ArrayList<BuildingCard>getUpperListBuilding() {
ArrayList<BuildingCard> cards = new ArrayList<>();
board.upperListBuilding.forEach(x->cards.add(x.clone()));
return cards;
return (ArrayList<BuildingCard>)board.upperListBuilding;
}
/**
@@ -299,9 +293,7 @@ public class Game implements Serializable {
* @return a list containing clones of the lower building cards currently available on the board.
*/
public ArrayList<BuildingCard>getLowerListBuilding() {
ArrayList<BuildingCard> cards = new ArrayList<>();
board.lowerListBuilding.forEach(x->cards.add(x.clone()));
return cards;
return (ArrayList<BuildingCard>) board.lowerListBuilding;
}
/**
@@ -492,7 +492,7 @@ public class MainFXMLController {
rect.setArcWidth(4);
rect.setArcHeight(4);
if (controller.miniModel.slotPlayerMap.containsValue(op.player)) {
rect.setOpacity(0.5);
rect.setVisible(false);
}
final double yRatio = positions[i];