Removed output
This commit is contained in:
parent
d52b8c60a9
commit
8bc4af7d8a
|
@ -67,19 +67,19 @@ public class MalteAI implements Player{
|
|||
// Get options which would lead to instant win.
|
||||
Set<Integer> winningOptions = getRowCompletionOptions(options, board, id);
|
||||
for (Integer i: winningOptions) {
|
||||
System.out.println("Choose to win");
|
||||
// System.out.println("Choose to win");
|
||||
return i.intValue();
|
||||
}
|
||||
// Get options which would prevent an instant win of the enemy.
|
||||
Set<Integer> preventionsOptions = getRowCompletionOptions(options, board, enemyID);
|
||||
for (Integer i: preventionsOptions) {
|
||||
System.out.println("Choose to prevent");
|
||||
// System.out.println("Choose to prevent");
|
||||
return i.intValue();
|
||||
}
|
||||
// Choose a move that will continue a sequence that already exists.
|
||||
Set<Integer> twoOfFour = getTwoOfFourOptions(options, board, id);
|
||||
for (Integer i: twoOfFour) {
|
||||
System.out.println("Choose to progress");
|
||||
// System.out.println("Choose to progress");
|
||||
return i.intValue();
|
||||
}
|
||||
// Choose a move that will not lead to an instant win of the enemy
|
||||
|
@ -89,12 +89,12 @@ public class MalteAI implements Player{
|
|||
choosewisely.remove(i);
|
||||
int[][] fakeBoard = makeMove(copyBoard(board), i, id);
|
||||
if (getRowCompletionOptions(options, fakeBoard, enemyID).size() == 0) {
|
||||
System.out.println("Choose random but smart");
|
||||
// System.out.println("Choose random but smart");
|
||||
return i.intValue();
|
||||
}
|
||||
}
|
||||
// If nothing applies, take a random valied one.
|
||||
System.out.println("Choose random and stupid");
|
||||
// System.out.println("Choose random and stupid");
|
||||
return takeRandom(options).intValue();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue