Свойство | Тип | Описание | |
---|---|---|---|
$dayEnded | |||
$hunterNeedsToShoot | |||
$nightEnded | |||
$seerSeen | |||
$state | |||
$witchHealed | |||
$witchPoisoned | |||
$wolvesVoted |
Метод | Описание | |
---|---|---|
__construct ( $id, array $users, Slackwolf\Game\RoleStrategy\RoleStrategyInterface $roleStrategy ) | ||
addLobbyPlayer ( |
If the lobby is open, adds a user to it. | |
assignRoles ( ) | Assigns each user in the game to a role. | |
changeState ( $state ) | ||
clearPlayerVote ( $voterId ) | ||
clearVotes ( ) | ||
getDeadPlayers ( ) : |
An array containing all the users that have been killed. | |
getGuardedUserId ( ) : mixed | ||
getId ( ) : string | ||
getLastGuardedUserId ( ) : mixed | ||
getLivingPlayers ( ) : |
An array containing all users that are still alive. | |
getLobbyPlayers ( ) : |
||
getNumRole ( $roleType ) : integer | ||
getOriginalNumRole ( $roleType ) : integer | ||
getOriginalPlayers ( ) : |
||
getOriginalPlayersOfRole ( $roleType ) : |
||
getPlayerById ( $id ) : |
||
getPlayersOfRole ( $roleType ) : |
||
getRoleStrategy ( ) : Slackwolf\Game\RoleStrategy\RoleStrategyInterface | ||
getState ( ) : integer | ||
getVillageTeam ( ) : |
||
getVotes ( ) : array | ||
getWerewolves ( ) : |
||
getWitchHealed ( ) : mixed | ||
getWitchHealedUserId ( ) : mixed | ||
getWitchHealingPotion ( ) : integer | ||
getWitchPoisonPotion ( ) : integer | ||
getWitchPoisoned ( ) : mixed | ||
getWitchPoisonedUserId ( ) : mixed | ||
getWolvesVoted ( ) : mixed | ||
hasPlayerVoted ( $voterId ) : boolean | ||
isOver ( ) : boolean | ||
isPlayerAlive ( $playerId ) : boolean | Whether or not the player is alive. | |
killPlayer ( $player_id ) | Kills the specified player. | |
removeLobbyPlayer ( $player_id ) : boolean | Removes a user from the game lobby. | |
seerSeen ( ) : mixed | ||
setDayEnded ( boolean $val ) | ||
setGuardedUserId ( $id ) | ||
setHunterNeedsToShoot ( boolean $val ) | ||
setLastGuardedUserId ( $id ) | ||
setNightEnded ( boolean $val ) | ||
setSeerSeen ( $seen ) | ||
setWitchHealed ( $healed ) | ||
setWitchHealedUserId ( $id ) | ||
setWitchHealingPotion ( $val ) | ||
setWitchPoisonPotion ( $val ) | ||
setWitchPoisoned ( $poisoned ) | ||
setWitchPoisonedUserId ( $id ) | ||
setWolvesVoted ( mixed $wolvesVoted ) | ||
vote ( $voterId, $voteForId ) | ||
votingFinished ( ) : boolean | ||
whoWon ( ) : mixed |
public __construct ( $id, array $users, Slackwolf\Game\RoleStrategy\RoleStrategyInterface $roleStrategy ) | ||
$id | ||
$users | array | |
$roleStrategy | Slackwolf\Game\RoleStrategy\RoleStrategyInterface |
public addLobbyPlayer ( |
||
$user | The user to add to the lobby. | |
Результат | boolean | If successful, returns TRUE, otherwise, FALSE. |
public getDeadPlayers ( ) : |
||
Результат | Users who have been killed. |
public getLivingPlayers ( ) : |
||
Результат | Users who are currently alive. |
public getLobbyPlayers ( ) : |
||
Результат | An array of the lobby members. |
public getOriginalNumRole ( $roleType ) : integer | ||
Результат | integer |
public getOriginalPlayersOfRole ( $roleType ) : |
||
Результат |
public getPlayerById ( $id ) : |
||
$id | ||
Результат |
public getPlayersOfRole ( $roleType ) : |
||
Результат |
public getRoleStrategy ( ) : Slackwolf\Game\RoleStrategy\RoleStrategyInterface | ||
Результат | Slackwolf\Game\RoleStrategy\RoleStrategyInterface | The game's strategy type. |
public getWitchHealingPotion ( ) : integer | ||
Результат | integer |
public hasPlayerVoted ( $voterId ) : boolean | ||
$voterId | ||
Результат | boolean |
public isPlayerAlive ( $playerId ) : boolean | ||
$playerId | The Slack user ID. | |
Результат | boolean | TRUE if player is alive and in game, otherwise FALSE. |
public killPlayer ( $player_id ) | ||
$player_id | The player to kill. |
public removeLobbyPlayer ( $player_id ) : boolean | ||
$player_id | The user to remove from the lobby. | |
Результат | boolean | If successful, returns TRUE, otherwise, FALSE. |