Did bug work-around

This commit is contained in:
Malte Tammena 2017-10-20 17:11:08 +02:00 committed by Maurizio Bruetsch
parent 62f6466370
commit 6f55dde659

View file

@ -68,6 +68,7 @@ public class MalteAI implements Player{
return i.intValue();
}
// Get options which would prevent an instant win of the enemy.
enemyID = enemyID == 0 ? 1: enemyID;
Set<Integer> preventionsOptions = getRowCompletionOptions(options, board, enemyID);
for (Integer i: preventionsOptions) {
// Only accept options, that would not cause a winning opportunity for the enemy.