Package | Description |
---|---|
de.smarten.tsuro.shared.gamemodel |
The GameModel package is used by every other component of our software.
|
de.smarten.tsuro.shared.network | |
de.smarten.tsuro.shared.network.client |
This package contains classes and interfaces for ClientToServerConnections.
|
Modifier and Type | Method and Description |
---|---|
GameModel |
GameModelObservable.getGameModel()
Returns the GameModel object this GameModelObservable belongs to.
|
Constructor and Description |
---|
Game(String name,
int gameId,
Configuration configuration,
GameModel gameModel)
Deprecated.
please use the constructor without passing a GameModel, since this will happen automatically by the GameModel when setting it's Game object
Constructor method. Creates a new game with the parameters passed.
|
Player(Client client,
Token token,
GameModel gameModel)
Deprecated.
Setting the GameModel is done by the GameModel itself when a player is added. Do not pass a GameModel here.
Constructor for a Player object containing an existing client object.
Binds to the token passed and adds the gameModel as an observer.
|
Player(String name,
boolean isAI,
Token token,
int clientId,
GameModel gameModel)
Deprecated.
Setting the GameModel is done by the GameModel itself when a player is added. Do not pass a GameModel here.
Constructor for a Player object. Binds to the token passed and adds the gameModel as an observer.
|
Token(Gate gate,
Position position,
GameModel gameModel)
Deprecated.
The GameModel will be set by the GameModel itself, please don't pass a GameModel here.
This constructor creates a token. When creating a player, the Player constructor
binds the token to the Player by calling the
setPlayer method. |
Modifier and Type | Method and Description |
---|---|
static GameModel |
GameModelTranslator.translateIntoGameModel(de.upb.swt.swtpra2017.swtinterface.GameStateNotification n)
Generates a new GameModel from a given GameStateNotification.
|
Modifier and Type | Method and Description |
---|---|
static de.upb.swt.swtpra2017.swtinterface.Player |
GameModelTranslator.getCashedEPlayerById(int clientId,
GameModel gameModel)
Returns an EMF Player object from a specific GameModel by Id using the existing
EMF translation of the GameModel.
|
static de.upb.swt.swtpra2017.swtinterface.GameStateNotification |
GameModelTranslator.translateIntoGameStateNotification(GameModel gameModel)
Outputs a GameStateNotification containing the information of the gameModel passed.
|
static void |
GameModelTranslator.updateGameModelByNotification(GameModel model,
org.eclipse.emf.ecore.EObject inputObject)
To be used on the client's side.
|
Modifier and Type | Field and Description |
---|---|
protected GameModel |
ObserverClientToServerConnection.gameModel |
Modifier and Type | Method and Description |
---|---|
void |
IClientToServerConnectionCallable.startGame(GameModel gameModel)
Will be called by the ClientToServerConnection when the first GameStateNotification
is received.
|
Copyright © 2017 smarTen. All rights reserved.