revert commit

This commit is contained in:
Cedric Beck
2024-12-09 17:20:34 +01:00
parent 6bc769f5bb
commit ac719c55e6
2 changed files with 21 additions and 27 deletions

View File

@@ -87,16 +87,16 @@ public Game() {
gameStatistics = new Statistic();
initializeDrawPile();
board = new Board();
die = new Die(2,4,5,5,1,3);
die = new Die();
}
/**
* This method initializes the draw pile with the predefined number of bonus cards.
*/
private void initializeDrawPile() {
this.addBonusCards(new ShieldCard(), AMOUNT_OF_SHIELD_CARDS);
this.addBonusCards(new TurboCard(), AMOUNT_OF_TURBO_CARDS);
this.addBonusCards(new SwapCard(), AMOUNT_OF_SWAP_CARDS);
this.addBonusCards(new ShieldCard(), AMOUNT_OF_SHIELD_CARDS);
Collections.shuffle(this.drawPile);
}
@@ -210,6 +210,15 @@ public Player getPlayerByColor(Color color) {
return null;
}
/**
* This method will be used to the get the active player
*
* @return the active player
*/
public Player getActivePlayer(){
return getPlayerByColor(activeColor);
}
/**
* This method will be used to return all connected players as a list.
*