From 2e9347cfb351e6a1494a11d024c7f730be1d1e9a Mon Sep 17 00:00:00 2001 From: Malte Tammena Date: Fri, 20 Oct 2017 09:12:16 +0200 Subject: [PATCH] AI improvements --- src/player/malte/MalteAI.java | 3 --- src/player/malte/Pattern.java | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/player/malte/MalteAI.java b/src/player/malte/MalteAI.java index df17d17..6ea639a 100644 --- a/src/player/malte/MalteAI.java +++ b/src/player/malte/MalteAI.java @@ -37,7 +37,6 @@ public class MalteAI implements Player{ } Set winningOptions = getRowCompletionOptions(options, board, id); for (Integer i: winningOptions) { - System.out.println("WINNING"); return i.intValue(); } @@ -45,12 +44,10 @@ public class MalteAI implements Player{ for (Integer i: preventionsOptions) { int[][] fakeBoard = makeMove(copyBoard(board), i, id); if (getRowCompletionOptions(options, fakeBoard, enemyID).size() == 0) { - System.out.println("PREVENTING"); return i.intValue(); } } - System.out.println("RANDOM"); return takeRandom(options).intValue(); } diff --git a/src/player/malte/Pattern.java b/src/player/malte/Pattern.java index a44108c..ca61f66 100644 --- a/src/player/malte/Pattern.java +++ b/src/player/malte/Pattern.java @@ -6,6 +6,9 @@ import java.util.Arrays; import game.Game; +/** + * A Connect Four Pattern. + */ public class Pattern { private Set parts;