This commit is contained in:
Aubin DORIVAL
2025-04-14 09:37:18 +02:00
parent d988b43b7c
commit 713467047d
2 changed files with 3 additions and 5 deletions

View File

@@ -2,10 +2,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
<<<<<<< HEAD
=======
import java.util.EnumMap; import java.util.EnumMap;
>>>>>>> 20e2f2eaec0f2988bef55ac30d3f0b3f123b171d
/** /**
* The board of the game Gomoku. * The board of the game Gomoku.

View File

@@ -85,7 +85,7 @@ public class GomokuGame {
} }
GomokuGame g = new GomokuGame(false);// metre true ou fals si in veut l'affichage ou non GomokuGame g = new GomokuGame(false);// metre true ou fals si in veut l'affichage ou non
g.board = new GomokuBoard(sizeX, sizeY); g.board = new GomokuBoard(sizeX, sizeY);
g.board.get(sizeX / 2, sizeY / 2).setState(Color.BLACK); g.board.get(0, 0).setState(Color.BLACK);
g.player1 = new Human("un", Color.WHITE, nbToken); g.player1 = new Human("un", Color.WHITE, nbToken);
g.player2 = new GomokuAI("deux", Color.BLACK, nbToken - 1); g.player2 = new GomokuAI("deux", Color.BLACK, nbToken - 1);
System.out.println(g.board); System.out.println(g.board);
@@ -146,6 +146,7 @@ public class GomokuGame {
} }
System.out.println(board.countMax(board.countAlignedCells(currentPlay))); System.out.println(board.countMax(board.countAlignedCells(currentPlay)));
if (NB_CELL_PLAY <= 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; return;
} }