Refactor console rendering
This commit is contained in:
@@ -160,20 +160,16 @@ public class GomokuGame {
|
||||
this.board.expandBoard(cardinal);
|
||||
}
|
||||
}
|
||||
System.out.println(board.countMax(board.countAlignedCells(currentPlay)));
|
||||
if (NB_CELL_PLAY <= board.countMax(board.countAlignedCells(currentPlay))) {
|
||||
System.out.println("Le joueur " + this.currentPlayer + " a gagné !");
|
||||
// this.renderer.updateStatus("Le joueur " + this.currentPlayer + "a gagné !");
|
||||
this.renderer.updateStatus("Le joueur " + this.currentPlayer + "a gagné !");
|
||||
return;
|
||||
}
|
||||
this.currentPlayer.tokens -= 1;
|
||||
this.currentPlayer = this.nextPlayer();
|
||||
renderer.update();
|
||||
// System.out.println(this.board);
|
||||
}
|
||||
|
||||
// this.renderer.updateStatus("Match nul, il ne reste plus de jeton.");
|
||||
System.out.println("Match nul, il ne reste plus de jeton");
|
||||
this.renderer.updateStatus("Match nul, il ne reste plus de jetons.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user