Ajouts minimes (Implémentation & ajout de la méthode play())

This commit is contained in:
valentinlucas 2021-10-17 17:03:18 +02:00
parent 38af64cdf0
commit c9380a229f
3 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,10 @@
package fr.lnl.game.server.games; package fr.lnl.game.server.games;
import fr.lnl.game.server.games.grid.Grid; 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.player.Player;
import fr.lnl.game.server.games.weapon.Firearm;
import fr.lnl.game.server.utils.Point;
public class Game { public class Game {
@ -17,6 +20,11 @@ public class Game {
this.current_player = player_One; this.current_player = player_One;
} }
public void play(){
}
public boolean isOver(){ public boolean isOver(){
return players.length == 1; return players.length == 1;
} }

View File

@ -3,7 +3,7 @@ package fr.lnl.game.server.games.player;
import fr.lnl.game.server.games.weapon.Weapon; import fr.lnl.game.server.games.weapon.Weapon;
import fr.lnl.game.server.utils.Point; 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) { public ComputerPlayer(int id, Point position, int energy, Weapon weapon, boolean shieldDeploy) {
super(id, position, energy, weapon, shieldDeploy); super(id, position, energy, weapon, shieldDeploy);
} }

View File

@ -3,7 +3,7 @@ package fr.lnl.game.server.games.player;
import fr.lnl.game.server.games.weapon.Weapon; import fr.lnl.game.server.games.weapon.Weapon;
import fr.lnl.game.server.utils.Point; 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) { public HumanPlayer(int id, Point position, int energy, Weapon weapon, boolean shieldDeploy) {
super(id, position, energy, weapon, shieldDeploy); super(id, position, energy, weapon, shieldDeploy);
} }