public class Dungeon extends Object implements Game, Serializable
Game is what players actually play
with. This represents the named games that a client sees in the lobby, and
manages interaction with boards and artificial intelligence.NAME_PREFIX| Constructor and Description |
|---|
Dungeon(String name,
int spriteMapId,
GameConnector connector)
Creates a new instance of a
Dungeon. |
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Returns the name of this dungeon.
|
MessageHandler |
join(Player player)
Adds the given
Player to this Game. |
void |
leave(Player player)
Removed the given
Player from this Game. |
int |
numPlayers()
Returns the number of players currently in this dungeon.
|
String |
toString() |
public Dungeon(String name, int spriteMapId, GameConnector connector)
Dungeon.name - the name of this dungeonspriteMapId - the sprite map used by this dungeonconnectorRef - the entry Connectorpublic MessageHandler join(Player player)
Player to this Game.public void leave(Player player)
Player from this Game.public String getName()
public int numPlayers()
numPlayers in interface GameCopyright © 2013. All Rights Reserved.