diff --git a/src/java/com/threerings/parlor/turn/TurnGameManagerDelegate.java b/src/java/com/threerings/parlor/turn/TurnGameManagerDelegate.java index 3a4d89dec..191039f18 100644 --- a/src/java/com/threerings/parlor/turn/TurnGameManagerDelegate.java +++ b/src/java/com/threerings/parlor/turn/TurnGameManagerDelegate.java @@ -1,5 +1,5 @@ // -// $Id: TurnGameManagerDelegate.java,v 1.2 2002/02/12 07:01:54 mdb Exp $ +// $Id: TurnGameManagerDelegate.java,v 1.3 2002/02/12 07:17:33 mdb Exp $ package com.threerings.parlor.turn; @@ -64,6 +64,24 @@ public class TurnGameManagerDelegate } } + /** + * Returns the index of the current turn holder as configured in the + * game object. + * + * @return the index into the players array of the current turn holder + * or -1 if there is no current turn holder. + */ + public int getTurnHolderIndex () + { + String holder = _turnGame.getTurnHolder(); + for (int i = 0; i < _players.length; i++) { + if (_players[i].equals(holder)) { + return i; + } + } + return -1; + } + /** * This is called to determine whichi player will take the first * turn. The default implementation chooses a player at random. @@ -144,24 +162,6 @@ public class TurnGameManagerDelegate _turnIdx = (_turnIdx + 1) % _players.length; } - /** - * Returns the index of the current turn holder as configured in the - * game object. - * - * @return the index into the players array of the current turn holder - * or -1 if there is no current turn holder. - */ - protected int getTurnHolderIndex () - { - String holder = _turnGame.getTurnHolder(); - for (int i = 0; i < _players.length; i++) { - if (_players[i].equals(holder)) { - return i; - } - } - return -1; - } - /** The game manager for which we are delegating. */ protected TurnGameManager _tgmgr;