fixing losing game...

This commit is contained in:
marcins78@gmail.com
2011-09-20 00:56:44 +00:00
parent a1ec65b132
commit 1dc876f000

View File

@@ -128,12 +128,12 @@ public class LotroGameMediator {
if (currentTime > decisionSent + _playerDecisionTimeoutPeriod) if (currentTime > decisionSent + _playerDecisionTimeoutPeriod)
_lotroGame.playerLost(playerId, "Player decision timed-out"); _lotroGame.playerLost(playerId, "Player decision timed-out");
} }
}
for (Map.Entry<String, Integer> playerClock : _playerClocks.entrySet()) { for (Map.Entry<String, Integer> playerClock : _playerClocks.entrySet()) {
String player = playerClock.getKey(); String player = playerClock.getKey();
if (_maxSecondsForGamePerPlayer - playerClock.getValue() - getCurrentUserPendingTime(player) < 0) if (_maxSecondsForGamePerPlayer - playerClock.getValue() - getCurrentUserPendingTime(player) < 0)
_lotroGame.playerLost(player, "Player run out of time"); _lotroGame.playerLost(player, "Player run out of time");
}
} }
} finally { } finally {
_writeLock.unlock(); _writeLock.unlock();