Did bug work-around

This commit is contained in:
Malte Tammena 2017-10-20 17:11:08 +02:00
parent 3e574c84f6
commit 21ec72f499

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.