Fixed enemyID bug

This commit is contained in:
Malte Tammena 2017-10-20 22:30:15 +02:00 committed by Maurizio Bruetsch
parent 96758d864d
commit eef311480f

View file

@ -49,7 +49,8 @@ public class MalteAI implements Player{
this.enemyID = id == 1 ? 2: 1;
}
public void setEnemyID(int id) {
@Override
public void setEnemyID(int enemyID) {
this.enemyID = enemyID;
}
@ -70,7 +71,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");