diff --git a/src/game/Game.java b/src/game/Game.java index dce9669..f9c9e32 100644 --- a/src/game/Game.java +++ b/src/game/Game.java @@ -86,7 +86,6 @@ public class Game { for (int i = 0; i < runs; i++) { int result = new Game(p1, p2).start(false, true); // TODO: Improve IDs - System.out.println(result); statistic[result]++; } double[] percents = new double[3]; diff --git a/src/player/malte/MalteAI.java b/src/player/malte/MalteAI.java index 77476ad..95207f8 100644 --- a/src/player/malte/MalteAI.java +++ b/src/player/malte/MalteAI.java @@ -31,7 +31,6 @@ public class MalteAI implements Player{ } Set winningOptions = getWinningOptions(options, board); for (Integer i: winningOptions) { - System.out.println(i); return i.intValue(); } @@ -58,14 +57,14 @@ public class MalteAI implements Player{ new Item(0, 1, id), new Item(0, 2, id), new Item(0, 3, id))); - // for (Pattern p: patterns) { - // System.out.println(p); - // } Set matches = Pattern.matchingPatterns(patterns, board); Set ret = new HashSet<>(); for (Pattern p: matches) { + Set positions = p.matches(board); for (Item i: p.getZeros()) { - ret.add(new Integer(i.getPosX())); + for(Position pos: positions) { + ret.add(new Integer(i.getPosX() + pos.getPosX())); + } } }