Added the notion of a round with an associated round identifier that is

incremented whenever the game is reset.  Games that don't make use of the
resetting functionality essentially consist of a single round.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1420 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-06-03 21:08:57 +00:00
parent bce33033d8
commit c4c8e2297b
2 changed files with 31 additions and 3 deletions
@@ -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. */