Class Index | File Index

Classes


Class ActionManager


Defined in: action-manager.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Manage the actions
Method Summary
Method Attributes Method Name and Description
 
abandon(playerId)
Abandon the game
 
attackUnit(string, string, string)
Attack a target with a unit
 
canPlay(player)
check if the player can play
 
endTurn(playerId)
Finish turn of current player (before time out)
 
moveUnit(string, int, int, cellY)
Move a unit to a cell
Class Detail
ActionManager(game)
Manage the actions
Author: Maxime COLIN.
Parameters:
game
instance of the game
Method Detail
abandon(playerId)
Abandon the game
Parameters:
playerId
Id of player who wants to leave the game

attackUnit(string, string, string)
Attack a target with a unit
Parameters:
string
playerId id of the player
string
unitId id of the unit
string
targetId id of the target
Returns:
true if the action succeed, false otherwise

canPlay(player)
check if the player can play
Parameters:
player
Returns:
true if he can play, false otherwise

endTurn(playerId)
Finish turn of current player (before time out)
Parameters:
playerId
Id of player who wants to end his turn

moveUnit(string, int, int, cellY)
Move a unit to a cell
Parameters:
string
unitId id of the unit
int
cellX x coord of the cell
int
cellY y coord of the cell
cellY
Returns:
true if the action succeed, false otherwise

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Apr 05 2011 21:22:00 GMT+0200 (CEST)