basic multiplayer
Some checks failed
Linux arm64 / Build (push) Failing after 5m3s

This commit is contained in:
2025-01-26 18:53:45 +01:00
parent 6658b0e884
commit df07f11a9c
11 changed files with 149 additions and 20 deletions

View File

@@ -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;
}
}