Add: TribeCard Clone

This commit is contained in:
rubenpirreram
2026-03-27 18:37:33 +01:00
parent 72c219da5a
commit b5589d5dbc
7 changed files with 47 additions and 2 deletions
@@ -27,7 +27,30 @@ public class Game {
private OrderLogicCard orderLogicCard;
private Board board;
public int getnPlayers() {
public Player getPlayerByIndex(int playerIndex) throws IndexOutOfBoundsException {
if(playerIndex >= playersList.size())
throw new IndexOutOfBoundsException("Player index out of bounds");
return playersList.get(playerIndex);
}
/*
public TribeCard getUpperTribeCardByIndex(int playerIndex) throws IndexOutOfBoundsException
{
}
public TribeCard getLowerTribeCardByIndex()
{
}
public BuildingCard getUpperBuildingCardByIndex(int playerIndex) throws IndexOutOfBoundsException
{
}
public BuildingCard getLowerBuildingCardByIndex(int playerIndex) throws IndexOutOfBoundsException
{
}
*/
public int getNPlayers() {
return nPlayers;
}
public Game(int nPlayers) {