diff --git a/src/GomokuBoard.java b/src/GomokuBoard.java index 2edc5a0..439a9ad 100644 --- a/src/GomokuBoard.java +++ b/src/GomokuBoard.java @@ -273,7 +273,7 @@ public class GomokuBoard { int max = 0; for (Map.Entry entry : mapColor.entrySet()) { - if(entry.getValue() > max){ + if (entry.getValue() > max) { max = entry.getValue(); } } diff --git a/src/GomokuGame.java b/src/GomokuGame.java index ddd8d17..636f875 100644 --- a/src/GomokuGame.java +++ b/src/GomokuGame.java @@ -149,6 +149,7 @@ public class GomokuGame { } 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é !"); return; } diff --git a/src/Player.java b/src/Player.java index 41be05f..35b6da1 100644 --- a/src/Player.java +++ b/src/Player.java @@ -54,4 +54,9 @@ abstract class Player{ * @return The cell of the move played. */ public abstract GomokuCell chooseMove(GomokuBoard board); + + @Override + public String toString() { + return this.getName(); + } }