PHP Class Slackwolf\Game\GameManager

Afficher le fichier Open project: chrisgillis/slackwolf Class Usage Examples

Méthodes publiques

Свойство Type Description
$optionsManager OptionsManager

Méthodes publiques

Méthode Description
__construct ( RealTimeClient $client, array $commandBindings ) Defines the GameManager constructor.
changeGameState ( $gameId, $newGameState )
endGame ( $id, null $enderUserId = null )
getGame ( $id ) : Game | boolean
hasGame ( $id ) : boolean
input ( Message $message ) : boolean
newGame ( $id, array $users, $roleStrategy )
sendMessageToChannel ( Game $game, $msg ) Sends a message to a game.
startGame ( $id )
vote ( Game $game, $voterId, $voteForId )

Private Methods

Méthode Description
addGame ( Game $game )
onDay ( Game $game )
onFirstNight ( Game $game )
onGameOver ( Game $game )
onNight ( Game $game )
onNightEnd ( Game $game )

Method Details

__construct() public méthode

Defines the GameManager constructor.
public __construct ( RealTimeClient $client, array $commandBindings )
$client Slack\RealTimeClient
$commandBindings array

changeGameState() public méthode

public changeGameState ( $gameId, $newGameState )
$gameId
$newGameState

endGame() public méthode

public endGame ( $id, null $enderUserId = null )
$id
$enderUserId null

getGame() public méthode

public getGame ( $id ) : Game | boolean
$id
Résultat Game | boolean

hasGame() public méthode

public hasGame ( $id ) : boolean
$id
Résultat boolean

input() public méthode

public input ( Message $message ) : boolean
$message Slackwolf\Message\Message
Résultat boolean

newGame() public méthode

public newGame ( $id, array $users, $roleStrategy )
$id
$users array
$roleStrategy

sendMessageToChannel() public méthode

Sends a message to a game.
public sendMessageToChannel ( Game $game, $msg )
$game Game The game to send the message.
$msg The message.

startGame() public méthode

public startGame ( $id )
$id

vote() public méthode

public vote ( Game $game, $voterId, $voteForId )
$game Game
$voterId
$voteForId

Property Details

$optionsManager public_oe property

public OptionsManager,Slackwolf\Game $optionsManager
Résultat OptionsManager