From 6448309b0e40b24ee93d5951977867e87529aad1 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 13 Feb 2002 18:50:15 +0000 Subject: [PATCH] startGame() and endGame() need to be public to be accessible to the delegates; added isGameOver() to standardize the way that the delegates determine that the game is over (isGameOver() may need to be customized by the games, so we want the delegates to use the game's custom code when appropriate). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@996 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/parlor/game/GameManager.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/parlor/game/GameManager.java b/src/java/com/threerings/parlor/game/GameManager.java index 47dd91b6a..bf874e601 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.19 2002/02/13 03:21:28 mdb Exp $ +// $Id: GameManager.java,v 1.20 2002/02/13 18:50:15 mdb Exp $ package com.threerings.parlor.game; @@ -74,6 +74,14 @@ public class GameManager extends PlaceManager return _players; } + /** + * Returns whether the game is over. + */ + public boolean isGameOver () + { + return (_gameobj.state == GameObject.GAME_OVER); + } + // documentation inherited protected void didStartup () { @@ -137,7 +145,7 @@ public class GameManager extends PlaceManager * one or both of the calldown functions (rather than this function) * if they need to do things before or after the game starts. */ - protected void startGame () + public void startGame () { // let the derived class do its pre-start stuff gameWillStart(); @@ -188,7 +196,7 @@ public class GameManager extends PlaceManager * calldown functions to determine the winner of the game and then * transition the game to the GAME_OVER state. */ - protected void endGame () + public void endGame () { // figure out who won...