diff --git a/server/src/main/java/fr/lnl/game/server/games/Game.java b/server/src/main/java/fr/lnl/game/server/games/Game.java index 0bc4d50..b4bf0d0 100644 --- a/server/src/main/java/fr/lnl/game/server/games/Game.java +++ b/server/src/main/java/fr/lnl/game/server/games/Game.java @@ -1,4 +1,34 @@ package fr.lnl.game.server.games; +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.Player; + public class Game { -} + + Grid grid; + Player player_One; + Player player_Two; + Player current_player; + Player[] players = {player_One,player_Two}; + + public Game(Grid grid, Player player_One, Player player_Two){ + this.player_One = player_One; + this.player_Two = player_Two; + this.current_player = player_One; + } + + public boolean isOver(){ + return players.length == 1; + } + + public Player getWinner(){ + if(isOver()){ + return players[0]; + } + return null; + } + + public Player getCurrent_player() { + return current_player; + } +} \ No newline at end of file