Packagecom.electrotank.electroserver4.entities
Classpublic class ServerGame

This class is used to represent a game on the server. When a client sends a FindGamesRequest, a FindGamesResponse is reached. The FindGamesResponse contains a list of games found. Each game is represented by an instance of this class.



Public Methods
 MethodDefined by
  
Creates a new instance of the ServerGame class.
ServerGame
  
Gets the game details property of the game.
ServerGame
  
getGameId():Number
Gets the game id.
ServerGame
  
getLocked():Boolean
Gets the locked property of the game.
ServerGame
  
Gets the passwordProtected property of the game.
ServerGame
  
setGameDetails(gameDetails:EsObject):void
Sets the game details property of the game.
ServerGame
  
setGameId(gameId:Number):void
Sets the id of the game.
ServerGame
  
setLocked(locked:Boolean):void
Sets the locked property of the game.
ServerGame
  
setPasswordProtected(passwordProtected:Boolean):void
Sets the passwordProtected property.
ServerGame
Constructor detail
ServerGame()constructor
public function ServerGame()

Creates a new instance of the ServerGame class.

Method detail
getGameDetails()method
public function getGameDetails():EsObject

Gets the game details property of the game. Every game has a public property represented by an EsObject.

Returns
EsObject — The game details property of the game.
getGameId()method 
public function getGameId():Number

Gets the game id.

Returns
Number — Returns the game id.
getLocked()method 
public function getLocked():Boolean

Gets the locked property of the game.

Returns
Boolean — The locked property of the game.
getPasswordProtected()method 
public function getPasswordProtected():Boolean

Gets the passwordProtected property of the game.

Returns
Boolean — The password protected property of the game.
setGameDetails()method 
public function setGameDetails(gameDetails:EsObject):void

Sets the game details property of the game. Every game has a public property represented by an EsObject.

Parameters
gameDetails:EsObject — The game details property of the game.
setGameId()method 
public function setGameId(gameId:Number):void

Sets the id of the game.

Parameters
gameId:Number — The id of the game.
setLocked()method 
public function setLocked(locked:Boolean):void

Sets the locked property of the game. If true that means the game is locked and cannot be joined.

Parameters
locked:Boolean — The locked property of the game.
setPasswordProtected()method 
public function setPasswordProtected(passwordProtected:Boolean):void

Sets the passwordProtected property. If true, then the server game requires a password to join.

Parameters
passwordProtected:Boolean — True or false.