Shut down the game manager when everyone leaves the room. The game object

and manager will simply disappear at that point which means that the game
will be aborted if it hasn't yet been completed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@547 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-10-24 01:00:54 +00:00
parent 96b0faff38
commit 30185cb814
@@ -1,5 +1,5 @@
//
// $Id: GameManager.java,v 1.13 2001/10/18 18:39:10 mdb Exp $
// $Id: GameManager.java,v 1.14 2001/10/24 01:00:54 mdb Exp $
package com.threerings.parlor.game;
@@ -95,17 +95,27 @@ public class GameManager
}
}
// documentation inherited
protected void bodyEntered (int bodyOid)
{
}
// documentation inherited
protected void bodyLeft (int bodyOid)
{
super.bodyLeft(bodyOid);
// deal with disappearing players
}
/**
* When a game room becomes empty, we cancel the game if it's still in
* progress and close down the game room.
*/
protected void placeBecameEmpty ()
{
Log.info("Game room empty. Going away. [game=" + _gameobj + "].");
// shut down the place (which will destroy the game object and
// clean up after everything)
shutdown();
}
/**
* This is called when the game is ready to start (all players
* involved have delivered their "am ready" notifications). It calls