diff --git a/src/GomokuAI.java b/src/GomokuAI.java index 184c255..ce22702 100644 --- a/src/GomokuAI.java +++ b/src/GomokuAI.java @@ -31,7 +31,14 @@ public class GomokuAI extends Player{ playCell = playableCell.get(random.nextInt(playableCell.size())); break; case 1: - System.out.println("L'IA réflechit..."); + Map map = GetCellPoint(board); + int max=0; + for (Map.Entry entry : map.entrySet()) { + if(entry.getValue() > max){ + max = entry.getValue(); + playCell = entry.getKey(); + } + } default: throw new AssertionError(); } @@ -74,4 +81,6 @@ public class GomokuAI extends Player{ return map; } + + }