juste better
This commit is contained in:
@@ -4,12 +4,12 @@ import chess.model.Game;
|
||||
|
||||
public class CommandExecutor {
|
||||
|
||||
private final Game game;
|
||||
private final OutputSystem outputSystem;
|
||||
private Game game;
|
||||
private OutputSystem outputSystem;
|
||||
|
||||
public CommandExecutor(Game game, OutputSystem outputSystem) {
|
||||
this.game = game;
|
||||
this.outputSystem = outputSystem;
|
||||
public CommandExecutor() {
|
||||
this.game = null;
|
||||
this.outputSystem = null;
|
||||
}
|
||||
|
||||
public CommandResult executeCommand(Command command) {
|
||||
@@ -22,16 +22,14 @@ public class CommandExecutor {
|
||||
private void alternatePlayers() {
|
||||
this.game.switchPlayerTurn();
|
||||
this.outputSystem.playerTurn(this.game.getPlayerTurn());
|
||||
}
|
||||
|
||||
public void setOutputSystem(OutputSystem outputSystem) {
|
||||
this.outputSystem = outputSystem;
|
||||
}
|
||||
|
||||
public Game getGame() {
|
||||
return game;
|
||||
public void setGame(Game game) {
|
||||
this.game = game;
|
||||
}
|
||||
|
||||
public OutputSystem getOutputSystem() {
|
||||
return outputSystem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user