This commit is contained in:
Aubin DORIVAL
2025-04-14 10:30:24 +02:00
parent 77becb3492
commit 2959e4cafa

View File

@@ -11,7 +11,7 @@ public class GomokuGame {
public static final int DEFAULT_BOARD_WIDTH = 15; // largeur du plateau
public static final int DEFAULT_BOARD_HEIGHT = 15; // hauteur du plateau
public static final int DEFAULT_TOKENS_COUNT = 60; // nb de jetons
public static final int NB_CELL_PLAY = 5; // nb de jetons
public int NB_CELL_PLAY = 5; // nb de jetons
private Player player1;
private Player player2;
@@ -83,14 +83,19 @@ public class GomokuGame {
break;
}
}
if (sizeY < 3 || sizeX < 3) {
System.out.println("Board is too small !");
return;
}
GomokuGame g = new GomokuGame(false);// metre true ou fals si in veut l'affichage ou non
g.renderer = new ConsoleRenderer();
g.NB_CELL_PLAY = nbJetonsAligne;
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();
@@ -156,7 +161,7 @@ public class GomokuGame {
this.currentPlayer.tokens -= 1;
this.currentPlayer = this.nextPlayer();
renderer.update();
//System.out.println(this.board);
// System.out.println(this.board);
}
// this.renderer.updateStatus("Match nul, il ne reste plus de jeton.");