From c9380a229f1114f3a27ed5f40a7100d910d02abc Mon Sep 17 00:00:00 2001 From: valentinlucas <21901740@unicaen.fr> Date: Sun, 17 Oct 2021 17:03:18 +0200 Subject: [PATCH] =?UTF-8?q?Ajouts=20minimes=20(Impl=C3=A9mentation=20&=20a?= =?UTF-8?q?jout=20de=20la=20m=C3=A9thode=20play())?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main/java/fr/lnl/game/server/games/Game.java | 8 ++++++++ .../fr/lnl/game/server/games/player/ComputerPlayer.java | 2 +- .../java/fr/lnl/game/server/games/player/HumanPlayer.java | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) 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 b4bf0d0..0251e89 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,7 +1,10 @@ package fr.lnl.game.server.games; import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.ComputerPlayer; import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.games.weapon.Firearm; +import fr.lnl.game.server.utils.Point; public class Game { @@ -17,6 +20,11 @@ public class Game { this.current_player = player_One; } + + public void play(){ + + } + public boolean isOver(){ return players.length == 1; } diff --git a/server/src/main/java/fr/lnl/game/server/games/player/ComputerPlayer.java b/server/src/main/java/fr/lnl/game/server/games/player/ComputerPlayer.java index f4e0a95..a8bcb66 100644 --- a/server/src/main/java/fr/lnl/game/server/games/player/ComputerPlayer.java +++ b/server/src/main/java/fr/lnl/game/server/games/player/ComputerPlayer.java @@ -3,7 +3,7 @@ package fr.lnl.game.server.games.player; import fr.lnl.game.server.games.weapon.Weapon; import fr.lnl.game.server.utils.Point; -public class ComputerPlayer extends AbstractPlayer{ +public class ComputerPlayer extends AbstractPlayer implements Player{ public ComputerPlayer(int id, Point position, int energy, Weapon weapon, boolean shieldDeploy) { super(id, position, energy, weapon, shieldDeploy); } diff --git a/server/src/main/java/fr/lnl/game/server/games/player/HumanPlayer.java b/server/src/main/java/fr/lnl/game/server/games/player/HumanPlayer.java index 935266a..f56bcca 100644 --- a/server/src/main/java/fr/lnl/game/server/games/player/HumanPlayer.java +++ b/server/src/main/java/fr/lnl/game/server/games/player/HumanPlayer.java @@ -3,7 +3,7 @@ package fr.lnl.game.server.games.player; import fr.lnl.game.server.games.weapon.Weapon; import fr.lnl.game.server.utils.Point; -public class HumanPlayer extends AbstractPlayer{ +public class HumanPlayer extends AbstractPlayer implements Player{ public HumanPlayer(int id, Point position, int energy, Weapon weapon, boolean shieldDeploy) { super(id, position, energy, weapon, shieldDeploy); }