diff --git a/src/GomokuGame.java b/src/GomokuGame.java index df66ebc..f44fed5 100644 --- a/src/GomokuGame.java +++ b/src/GomokuGame.java @@ -11,6 +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 private Player player1; private Player player2; @@ -59,6 +60,12 @@ public class GomokuGame { public void startGame() { + GomokuCell actualPlayedCell = play(player1); + if( NB_CELL_PLAY >= board.countMax(board.countAlignedCells(actualPlayedCell))) + { + System.out.println("c'est gangée !"); + } + } /**