5581b3e65b
bit of fiddling to accomplish some things that used to be done by hand.) git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@973 542714f4-19e9-0310-aa3c-eee0fc999fb1
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
//
|
|
// $Id: GameObject.dobj,v 1.7 2002/02/08 23:55:25 mdb Exp $
|
|
|
|
package com.threerings.parlor.game;
|
|
|
|
import com.samskivert.util.StringUtil;
|
|
import com.threerings.crowd.data.PlaceObject;
|
|
|
|
/**
|
|
* A game object hosts the shared data associated with a game played by
|
|
* one or more players. The game object extends the place object so that
|
|
* the game can act as a place where players actually go when playing the
|
|
* game. Only very basic information is maintained in the base game
|
|
* object. It serves as the base for a hierarchy of game object
|
|
* derivatives that handle basic gameplay for a suite of different game
|
|
* types (ie. turn based games, party games, board games, card games,
|
|
* etc.).
|
|
*/
|
|
public class GameObject extends PlaceObject
|
|
{
|
|
/** A game state constant indicating that the game has not yet started
|
|
* and is still awaiting the arrival of all of the players. */
|
|
public static final int AWAITING_PLAYERS = 0;
|
|
|
|
/** A game state constant indicating that the game is in play. */
|
|
public static final int IN_PLAY = 1;
|
|
|
|
/** A game state constant indicating that the game ended normally. */
|
|
public static final int GAME_OVER = 2;
|
|
|
|
/** A game state constant indicating that the game was cancelled. */
|
|
public static final int CANCELLED = 3;
|
|
|
|
/** The game state, one of {@link #AWAITING_PLAYERS}, {@link #IN_PLAY},
|
|
* {@link #GAME_OVER}, or {@link #CANCELLED}. */
|
|
public int state;
|
|
|
|
/** Indicates whether or not this game is rated. */
|
|
public boolean isRated;
|
|
|
|
/** The username of the players involved in this game. */
|
|
public String[] players;
|
|
}
|