Fixed enemyID bug

This commit is contained in:
Malte Tammena 2017-10-20 22:30:15 +02:00
parent aaf84031a4
commit d492cd48dd

View file

@ -49,7 +49,7 @@ public class MalteAI implements Player{
}
@Override
public void setEnemyID(int id) {
public void setEnemyID(int enemyID) {
this.enemyID = enemyID;
}
@ -70,7 +70,6 @@ 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) {
System.out.println("Choose to prevent");