Fix omissions + Optimize import
This commit is contained in:
parent
134655b116
commit
8f19cf400c
@ -1,7 +1,5 @@
|
|||||||
package fr.lnl.game.server.games.action;
|
package fr.lnl.game.server.games.action;
|
||||||
|
|
||||||
import fr.lnl.game.server.games.grid.Grid;
|
|
||||||
import fr.lnl.game.server.games.player.Player;
|
|
||||||
|
|
||||||
public interface Action {
|
public interface Action {
|
||||||
void doAction();
|
void doAction();
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package fr.lnl.game.server.games.action;
|
package fr.lnl.game.server.games.action;
|
||||||
|
|
||||||
import fr.lnl.game.server.games.Game;
|
import fr.lnl.game.server.games.Game;
|
||||||
import fr.lnl.game.server.games.player.AbstractPlayer;
|
|
||||||
|
|
||||||
public class DeployShield extends AbstractAction {
|
public class DeployShield extends AbstractAction {
|
||||||
public DeployShield(Game game){
|
public DeployShield(Game game){
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package fr.lnl.game.server.games.action;
|
package fr.lnl.game.server.games.action;
|
||||||
|
|
||||||
import fr.lnl.game.server.games.Game;
|
import fr.lnl.game.server.games.Game;
|
||||||
import fr.lnl.game.server.games.player.AbstractPlayer;
|
|
||||||
|
|
||||||
public class DropBomb extends DropObject {
|
public class DropBomb extends DropObject {
|
||||||
|
|
||||||
|
@ -1,8 +1,19 @@
|
|||||||
package fr.lnl.game.server.games.action;
|
package fr.lnl.game.server.games.action;
|
||||||
|
|
||||||
|
import fr.lnl.game.server.games.Game;
|
||||||
|
|
||||||
public class Move extends AbstractAction {
|
public class Move extends AbstractAction {
|
||||||
|
public Move(Game game) {
|
||||||
|
super(game);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAction() {
|
public void doAction() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPossible() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,19 @@
|
|||||||
package fr.lnl.game.server.games.action;
|
package fr.lnl.game.server.games.action;
|
||||||
|
|
||||||
|
import fr.lnl.game.server.games.Game;
|
||||||
|
|
||||||
public class Shot extends AbstractAction {
|
public class Shot extends AbstractAction {
|
||||||
|
public Shot(Game game) {
|
||||||
|
super(game);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAction() {
|
public void doAction() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPossible() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public class Grid {
|
|||||||
System.out.print("\n");
|
System.out.print("\n");
|
||||||
for (int j = 0; j < y; j++) {
|
for (int j = 0; j < y; j++) {
|
||||||
Pair<Player, Box> value = board.get(new Point(i, j));
|
Pair<Player, Box> value = board.get(new Point(i, j));
|
||||||
if(value.getA() instanceof Player){
|
if(value.getA() != null){
|
||||||
System.out.print(" \033[0;34mP\033[0m");
|
System.out.print(" \033[0;34mP\033[0m");
|
||||||
}
|
}
|
||||||
else if (value.getB() instanceof Wall) {
|
else if (value.getB() instanceof Wall) {
|
||||||
|
@ -2,7 +2,6 @@ package fr.lnl.game.server.games.player;
|
|||||||
|
|
||||||
import fr.lnl.game.server.games.action.Action;
|
import fr.lnl.game.server.games.action.Action;
|
||||||
import fr.lnl.game.server.games.weapon.Weapon;
|
import fr.lnl.game.server.games.weapon.Weapon;
|
||||||
import fr.lnl.game.server.utils.Point;
|
|
||||||
|
|
||||||
public abstract class AbstractPlayer implements Player {
|
public abstract class AbstractPlayer implements Player {
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package fr.lnl.game.server.games.player;
|
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;
|
|
||||||
|
|
||||||
public interface ClassPlayer {
|
public interface ClassPlayer {
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package fr.lnl.game.server.games.player;
|
package fr.lnl.game.server.games.player;
|
||||||
|
|
||||||
import fr.lnl.game.server.utils.Point;
|
|
||||||
|
|
||||||
public class ComputerPlayer extends AbstractPlayer{
|
public class ComputerPlayer extends AbstractPlayer{
|
||||||
|
|
||||||
public ComputerPlayer(int id, boolean shieldDeploy, ClassPlayer classPlayer) {
|
public ComputerPlayer(int id, boolean shieldDeploy, ClassPlayer classPlayer) {
|
||||||
|
@ -3,6 +3,8 @@ package fr.lnl.game.server.games.player;
|
|||||||
import fr.lnl.game.server.games.weapon.Firearm;
|
import fr.lnl.game.server.games.weapon.Firearm;
|
||||||
import fr.lnl.game.server.games.weapon.Weapon;
|
import fr.lnl.game.server.games.weapon.Weapon;
|
||||||
|
|
||||||
|
@SuppressWarnings("all")
|
||||||
|
|
||||||
public class DefaultClassPlayer implements ClassPlayer{
|
public class DefaultClassPlayer implements ClassPlayer{
|
||||||
|
|
||||||
private final int ENERGY = 800;
|
private final int ENERGY = 800;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package fr.lnl.game.server.games.player;
|
package fr.lnl.game.server.games.player;
|
||||||
|
|
||||||
import fr.lnl.game.server.utils.Point;
|
|
||||||
|
|
||||||
public class HumanPlayer extends AbstractPlayer {
|
public class HumanPlayer extends AbstractPlayer {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user