From 2de9fef19d915bb4ad4d79b73de0e5c9028192b5 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 9 Jan 2008 00:51:59 +0000 Subject: [PATCH] A spot of cleanup. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@543 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../threerings/ezgame/server/EZPartyTurnDelegate.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/ezgame/server/EZPartyTurnDelegate.java b/src/java/com/threerings/ezgame/server/EZPartyTurnDelegate.java index 94698083..75d3da96 100644 --- a/src/java/com/threerings/ezgame/server/EZPartyTurnDelegate.java +++ b/src/java/com/threerings/ezgame/server/EZPartyTurnDelegate.java @@ -110,11 +110,8 @@ public class EZPartyTurnDelegate extends GameManagerDelegate return; } - Iterator itr = _ordering.iterator(); - while (itr.hasNext()) { - nextPlayerId = itr.next(); - if (nextPlayerId != _currentHolderId) { - setNextTurn(nextPlayerId); // should always work + for (int playerId : _ordering) { + if ((playerId != _currentHolderId) && setNextTurn(playerId)) { return; } } @@ -170,7 +167,7 @@ public class EZPartyTurnDelegate extends GameManagerDelegate /** A reference to our game object. */ protected TurnGameObject _turnGame; - /** Tracks the turn ordering for occupants. */ + /** Tracks the turn ordering for occupants. Initialized only if turns are used by the game. */ protected LinkedHashSet _ordering; /** The oid of the current turn holder. */