diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-17 22:12:43 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-17 22:12:43 +0200 |
commit | 5a4d1ccb12d697d6cd0a0ea187045c9f6370814c (patch) | |
tree | fbac044520bf9230bf58f006b9ed7742011e09fd /src/jrummikub/control/turn | |
parent | 47bf19036e049787fa7742f5ff72a08a0c9e887c (diff) | |
download | JRummikub-5a4d1ccb12d697d6cd0a0ea187045c9f6370814c.tar JRummikub-5a4d1ccb12d697d6cd0a0ea187045c9f6370814c.zip |
Removed AIUtil
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@449 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/turn')
-rw-r--r-- | src/jrummikub/control/turn/AIControl.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/jrummikub/control/turn/AIControl.java b/src/jrummikub/control/turn/AIControl.java index 8ab0aa5..324c8d7 100644 --- a/src/jrummikub/control/turn/AIControl.java +++ b/src/jrummikub/control/turn/AIControl.java @@ -5,16 +5,13 @@ import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.util.TreeMap; import javax.swing.SwingUtilities; import javax.swing.Timer; import jrummikub.ai.TurnLogic; -import jrummikub.control.AIUtil; import jrummikub.model.Position; import jrummikub.model.Stone; -import jrummikub.model.StoneColor; import jrummikub.model.StoneSet; import jrummikub.util.Pair; @@ -52,7 +49,8 @@ public class AIControl extends AbstractTurnControl { long turnLength = System.currentTimeMillis() - startTime; if (useBackgroundThread) { - Timer timer = new Timer(Math.max(0, (int) (1000 + Math.random() * 2000 - turnLength)), + Timer timer = new Timer(Math.max(0, + (int) (1000 + Math.random() * 2000 - turnLength)), new ActionListener() { @Override public void actionPerformed(ActionEvent event) { @@ -105,7 +103,7 @@ public class AIControl extends AbstractTurnControl { logic.needIntialMeldThreshold(); } if (useBackgroundThread) { - + Timer timer = new Timer(10000, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -114,7 +112,7 @@ public class AIControl extends AbstractTurnControl { }); timer.setRepeats(false); timer.start(); - + Thread computeThread = new Thread(new Runnable() { @Override public void run() { |