Did bug work-around
This commit is contained in:
parent
3e574c84f6
commit
21ec72f499
|
@ -68,6 +68,7 @@ public class MalteAI implements Player{
|
||||||
return i.intValue();
|
return i.intValue();
|
||||||
}
|
}
|
||||||
// Get options which would prevent an instant win of the enemy.
|
// Get options which would prevent an instant win of the enemy.
|
||||||
|
enemyID = enemyID == 0 ? 1: enemyID;
|
||||||
Set<Integer> preventionsOptions = getRowCompletionOptions(options, board, enemyID);
|
Set<Integer> preventionsOptions = getRowCompletionOptions(options, board, enemyID);
|
||||||
for (Integer i: preventionsOptions) {
|
for (Integer i: preventionsOptions) {
|
||||||
// Only accept options, that would not cause a winning opportunity for the enemy.
|
// Only accept options, that would not cause a winning opportunity for the enemy.
|
||||||
|
|
Loading…
Reference in a new issue