Modifications des classes liées aux actions
This commit is contained in:
parent
1090d358c2
commit
134655b116
@ -1,4 +1,10 @@
|
||||
package fr.lnl.game.server.games.action;
|
||||
|
||||
import fr.lnl.game.server.games.Game;
|
||||
|
||||
public abstract class AbstractAction implements Action {
|
||||
private Game game;
|
||||
public AbstractAction(Game game){
|
||||
this.game = game;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
package fr.lnl.game.server.games.action;
|
||||
|
||||
public interface Action {
|
||||
import fr.lnl.game.server.games.grid.Grid;
|
||||
import fr.lnl.game.server.games.player.Player;
|
||||
|
||||
public interface Action {
|
||||
void doAction();
|
||||
boolean isPossible();
|
||||
|
||||
public void doAction();
|
||||
}
|
||||
|
@ -1,8 +1,23 @@
|
||||
package fr.lnl.game.server.games.action;
|
||||
|
||||
import fr.lnl.game.server.games.Game;
|
||||
import fr.lnl.game.server.games.player.AbstractPlayer;
|
||||
|
||||
public class DeployShield extends AbstractAction {
|
||||
public DeployShield(Game game){
|
||||
super(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAction(){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPossible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,21 @@
|
||||
package fr.lnl.game.server.games.action;
|
||||
|
||||
import fr.lnl.game.server.games.Game;
|
||||
import fr.lnl.game.server.games.player.AbstractPlayer;
|
||||
|
||||
public class DropBomb extends DropObject {
|
||||
|
||||
public DropBomb(Game game){
|
||||
super(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAction() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPossible() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,18 @@
|
||||
package fr.lnl.game.server.games.action;
|
||||
|
||||
import fr.lnl.game.server.games.Game;
|
||||
|
||||
public class DropMine extends DropObject {
|
||||
public DropMine(Game game){
|
||||
super(game);
|
||||
}
|
||||
@Override
|
||||
public void doAction() {
|
||||
super.doAction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPossible() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,13 @@
|
||||
package fr.lnl.game.server.games.action;
|
||||
|
||||
import fr.lnl.game.server.games.Game;
|
||||
|
||||
public abstract class DropObject extends AbstractAction {
|
||||
|
||||
public DropObject(Game game){
|
||||
super(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAction() {
|
||||
|
||||
|
@ -1,8 +1,19 @@
|
||||
package fr.lnl.game.server.games.action;
|
||||
|
||||
import fr.lnl.game.server.games.Game;
|
||||
|
||||
public class Nothing extends AbstractAction {
|
||||
|
||||
public Nothing(Game game){
|
||||
super(game);
|
||||
}
|
||||
@Override
|
||||
public void doAction() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPossible() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user