Merge branch 'master' of gitlab.isima.fr:audorival/gomoku
This commit is contained in:
@@ -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<GomokuCell, Integer> map = GetCellPoint(board);
|
||||
int max=0;
|
||||
for (Map.Entry<GomokuCell, Integer> 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user