public class Level extends Object
Constructor and Description |
---|
Level(String name,
int levelIndex)
Constructs a new Level object.
|
Modifier and Type | Method and Description |
---|---|
void |
addClients(Collection<de.smarten.tsuro.shared.gamemodel.Client> clients)
|
void |
addGameControl(GameControl gc)
Adds a
GameControl to the Level . |
boolean |
equals(Object o) |
List<de.smarten.tsuro.shared.gamemodel.Client> |
getClients()
Gets the list of
Client s participating in the Level. |
de.smarten.tsuro.shared.gamemodel.Configuration |
getConfiguration()
Gets the
Configuration of this Level . |
List<GameControl> |
getGames()
Getter for the list of
GameControl s of this level. |
int |
getIndex()
Returns the index of the
Level . |
int |
getNumberOfGames()
Returns the number of games in the
Level . |
String |
getRoomNamePrefix()
Returns the prefix used for the names of the
Level 's Game s. |
List<de.smarten.tsuro.shared.gamemodel.Client> |
getWinningClients()
Gets a list of
Client s that have won their game. |
List<de.smarten.tsuro.shared.gamemodel.Client> |
removeAllClients()
Remove all
Client s from the Level and send them back. |
void |
removeGameControlByGame(de.smarten.tsuro.shared.gamemodel.Game g)
|
void |
setConfiguration(de.smarten.tsuro.shared.gamemodel.Configuration config)
Sets the standard
Configuration in the Level . |
void |
setNumberOfGames(int numberOfGames)
Sets the intended number of games in the
Level . |
public Level(String name, int levelIndex)
name
- The name used as a prefix for the Game
s' names.levelIndex
- The index of the Level
public List<GameControl> getGames()
GameControl
s of this level.public void addGameControl(GameControl gc)
GameControl
to the Level
.gc
- The GameControl
to be addedpublic void removeGameControlByGame(de.smarten.tsuro.shared.gamemodel.Game g)
g
- A game, the GameControl
of which shall be removed from the Level
public List<de.smarten.tsuro.shared.gamemodel.Client> getClients()
Client
s participating in the Level.public void addClients(Collection<de.smarten.tsuro.shared.gamemodel.Client> clients)
clients
- The Client
s to be addedpublic List<de.smarten.tsuro.shared.gamemodel.Client> removeAllClients()
Client
s from the Level
and send them back.public List<de.smarten.tsuro.shared.gamemodel.Client> getWinningClients()
Client
s that have won their game.Client
spublic de.smarten.tsuro.shared.gamemodel.Configuration getConfiguration()
Configuration
of this Level
.Configuration
public void setConfiguration(de.smarten.tsuro.shared.gamemodel.Configuration config)
Configuration
in the Level
.config
- standard Configuration
.public String getRoomNamePrefix()
Level
's Game
s.public int getIndex()
Level
.public int getNumberOfGames()
Level
.public void setNumberOfGames(int numberOfGames)
Level
.numberOfGames
- Number of gamesCopyright © 2017 smarTen. All rights reserved.