Removed AIUtil
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@449 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
47bf19036e
commit
5a4d1ccb12
3 changed files with 57 additions and 346 deletions
|
@ -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() {
|
||||
|
|
Reference in a new issue