This commit is contained in:
@@ -3,12 +3,21 @@ package game;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import sudoku.MultiDoku;
|
||||
|
||||
public class Game {
|
||||
|
||||
public static enum GameState {
|
||||
GameNotStarted, GameGoing, GameEnd
|
||||
}
|
||||
|
||||
private final Map<Integer, Player> players;
|
||||
private GameState gameState;
|
||||
private MultiDoku doku;
|
||||
|
||||
public Game() {
|
||||
this.players = new HashMap<>();
|
||||
this.gameState = GameState.GameNotStarted;
|
||||
}
|
||||
|
||||
public Player getPlayerById(int id) {
|
||||
@@ -27,4 +36,17 @@ public class Game {
|
||||
return players;
|
||||
}
|
||||
|
||||
public void startGame(MultiDoku doku) {
|
||||
this.doku = doku;
|
||||
this.gameState = GameState.GameGoing;
|
||||
}
|
||||
|
||||
public GameState getGameState() {
|
||||
return gameState;
|
||||
}
|
||||
|
||||
public MultiDoku getDoku() {
|
||||
return doku;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user