meilleur affichage
This commit is contained in:
@@ -84,11 +84,13 @@ public class GomokuGame {
|
||||
}
|
||||
}
|
||||
GomokuGame g = new GomokuGame(false);// metre true ou fals si in veut l'affichage ou non
|
||||
g.renderer = new ConsoleRenderer();
|
||||
g.renderer.init(g);
|
||||
g.board = new GomokuBoard(sizeX, sizeY);
|
||||
g.board.get(sizeX / 2, sizeY / 2).setState(Color.BLACK);
|
||||
g.player1 = new Human("un", Color.WHITE, nbToken);
|
||||
g.player2 = new GomokuAI("deux", Color.BLACK, nbToken - 1);
|
||||
System.out.println(g.board);
|
||||
//System.out.println(g.board);
|
||||
// g.renderer.update();
|
||||
g.startGame();
|
||||
|
||||
@@ -139,6 +141,7 @@ public class GomokuGame {
|
||||
* }
|
||||
*/
|
||||
this.currentPlayer = player1;
|
||||
renderer.update();
|
||||
while (this.player1.tokens > 0 || this.player2.tokens > 0) {
|
||||
GomokuCell currentPlay = null;
|
||||
while (currentPlay == null) {
|
||||
@@ -151,7 +154,8 @@ public class GomokuGame {
|
||||
}
|
||||
this.currentPlayer.tokens -= 1;
|
||||
this.currentPlayer = this.nextPlayer();
|
||||
System.out.println(this.board);
|
||||
renderer.update();
|
||||
//System.out.println(this.board);
|
||||
}
|
||||
|
||||
// this.renderer.updateStatus("Match nul, il ne reste plus de jeton.");
|
||||
|
||||
Reference in New Issue
Block a user