diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-30 01:31:36 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-30 01:31:36 +0200 |
commit | b19a46b7b259f3a6e189ba594446be3ad54801f5 (patch) | |
tree | 405d28e31fd04009d49749ed0d8d87365b0bb6b4 /src/jrummikub/control/turn | |
parent | 15558d7138efbf16a52d49484a6923b03514f453 (diff) | |
download | JRummikub-b19a46b7b259f3a6e189ba594446be3ad54801f5.tar JRummikub-b19a46b7b259f3a6e189ba594446be3ad54801f5.zip |
Implemented view code for AI turns
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@319 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/turn')
-rw-r--r-- | src/jrummikub/control/turn/BaseAIControl.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jrummikub/control/turn/BaseAIControl.java b/src/jrummikub/control/turn/BaseAIControl.java index 2ed4c6e..d143dc1 100644 --- a/src/jrummikub/control/turn/BaseAIControl.java +++ b/src/jrummikub/control/turn/BaseAIControl.java @@ -51,7 +51,8 @@ public class BaseAIControl extends AbstractTurnControl { private void emitEndOfTurn() { long timeElapsed = System.currentTimeMillis() - startTime; - long waitTime = 2000 - timeElapsed; + long timeNeeded = Math.min((long)(1000 + Math.random() * hand.getSize() * 100), 50000); + long waitTime = timeNeeded - timeElapsed; if (waitTime > 0) { try { |