Yatzy/Facade/Game.java

30 lines
548 B
Java

package Facade;
import java.util.ArrayList;
import Domain.Player;
public class Game {
ArrayList<Player> player = new ArrayList<>();
public int rollDice(){
return 0;
}
public ArrayList<Player> newPlayer(int playerCount, String name){
for(int i = 0; i < playerCount; i++){
Player p1 = new Player(name, null);
player.add(p1);
}
return player;
}
public int showScore(){
Player secondPlayer = player.get(1);
return secondPlayer.getSheet();
}
}