Implemented view code for AI turns

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@319 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Jannis Harder 2011-05-30 01:31:36 +02:00
parent 15558d7138
commit b19a46b7b2
8 changed files with 82 additions and 15 deletions

View file

@ -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 {