public class Creator extends Object implements Game, Serializable
The idea of this "game" is that it should be used to manage existing characters, create new ones, and delete ones you don't want any more ... for the present, however, it's just used to create characters one at a time, so we don't actually need to send anything to the user now other than their initial set of stats
| Modifier and Type | Field and Description |
|---|---|
static String |
IDENTIFIER
The identifier for the creator
|
NAME_PREFIX| Modifier and Type | Method and Description |
|---|---|
static Creator |
getInstance()
Provides access to the single instance of
Creator. |
String |
getName()
Returns the name of the creator.
|
MessageHandler |
join(Player player)
Joins a player to the creator.
|
void |
leave(Player player)
Removes a player from the creator.
|
int |
numPlayers()
Returns the number of players currently in the creator.
|
String |
toString() |
public static final String IDENTIFIER
public static Creator getInstance()
Creator. If
the creator hasn't already been created, then a new instance is
created and added as a registered GLO. If the creator
already exists then nothing new is created.
See the comments in Lobby for details on this pattern.
Creator instancepublic MessageHandler join(Player player)
public void leave(Player player)
public String getName()
IDENTIFIER.public int numPlayers()
numPlayers in interface GameCopyright © 2013. All Rights Reserved.