diff --git a/src/java/com/threerings/parlor/game/GameController.java b/src/java/com/threerings/parlor/game/GameController.java index 1e5ba5542..378ffe9bd 100644 --- a/src/java/com/threerings/parlor/game/GameController.java +++ b/src/java/com/threerings/parlor/game/GameController.java @@ -1,5 +1,5 @@ // -// $Id: GameController.java,v 1.14 2002/05/07 00:57:49 mdb Exp $ +// $Id: GameController.java,v 1.15 2002/06/03 21:08:57 shaper Exp $ package com.threerings.parlor.game; @@ -123,6 +123,17 @@ public abstract class GameController extends PlaceController // end the game until we receive a new board setGameOver(true); + + // increment the round identifier + _roundId++; + } + + /** + * Returns the unique round identifier for the current round. + */ + public int getRoundId () + { + return _roundId; } /** @@ -230,6 +241,9 @@ public abstract class GameController extends PlaceController * controlling. */ protected GameObject _gobj; + /** The unique round identifier for the current round. */ + protected int _roundId; + /** A local flag overriding the game over state for situations where * the client knows the game is over before the server has * transitioned the game object accordingly. */ diff --git a/src/java/com/threerings/parlor/game/GameManager.java b/src/java/com/threerings/parlor/game/GameManager.java index a2443537f..c5e970b4f 100644 --- a/src/java/com/threerings/parlor/game/GameManager.java +++ b/src/java/com/threerings/parlor/game/GameManager.java @@ -1,5 +1,5 @@ // -// $Id: GameManager.java,v 1.31 2002/06/01 23:14:53 ray Exp $ +// $Id: GameManager.java,v 1.32 2002/06/03 21:08:57 shaper Exp $ package com.threerings.parlor.game; @@ -106,6 +106,14 @@ public class GameManager extends PlaceManager return (_gameobj.state == GameObject.GAME_OVER); } + /** + * Returns the unique round identifier for the current round. + */ + public int getRoundId () + { + return _roundId; + } + // documentation inherited protected void didStartup () { @@ -320,6 +328,9 @@ public class GameManager extends PlaceManager // let the derived class do its pre-reset stuff gameWillReset(); + // increment the round identifier + _roundId++; + // do the standard game start processing gameWillStart(); _gameobj.setState(GameObject.IN_PLAY); @@ -439,8 +450,11 @@ public class GameManager extends PlaceManager /** The oids of our player and AI body objects. */ protected int[] _playerOids; + /** The unique round identifier for the current round. */ + protected int _roundId; + /** If AIs are present, contains their skill levels, or -1 at human - * player indexes.. */ + * player indexes. */ protected byte[] _AIs; /** Our delegate operator to tick AIs. */