2024-04-29 21:06:04 +02:00
|
|
|
package domain;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
public class Game {
|
2024-04-30 12:46:42 +02:00
|
|
|
private ArrayList<Player> currentPlayers;
|
|
|
|
private int turnPlayer;
|
|
|
|
private Dice dice;
|
2024-04-29 21:06:04 +02:00
|
|
|
|
|
|
|
public Game(){
|
|
|
|
currentPlayers = new ArrayList<Player>();
|
2024-04-30 12:46:42 +02:00
|
|
|
turnPlayer = 0;
|
|
|
|
dice = new Dice(6);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int rollDice(){
|
|
|
|
return dice.roll();
|
2024-04-29 21:06:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void addPlayer(Player playerToAdd){
|
|
|
|
currentPlayers.add(playerToAdd);
|
|
|
|
}
|
2024-04-30 12:46:42 +02:00
|
|
|
|
|
|
|
public ArrayList<Player> getPlayers(){
|
|
|
|
return currentPlayers;
|
|
|
|
}
|
2024-04-29 21:06:04 +02:00
|
|
|
}
|