check draw
This commit is contained in:
@@ -59,7 +59,11 @@ public class CommandExecutor {
|
||||
}
|
||||
|
||||
private void switchPlayerTurn() {
|
||||
this.game.switchPlayerTurn();
|
||||
if(this.game.switchPlayerTurn()) {
|
||||
this.dispatcher.onDraw();
|
||||
this.dispatcher.onGameEnd();
|
||||
return;
|
||||
}
|
||||
this.dispatcher.onPlayerTurn(this.game.getPlayerTurn());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user