PETTokenFunctionsTrait
- trait SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Traits\Utility\PETTokenFunctionsTrait
Methods
- private SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Traits\Utility\PETTokenFunctionsTrait::getAgeTokens()
- Returns an array with all the age tokens the game currently has and their properties (in the Deck componentsense). Useful for game progression computation
- Source
- Returns
array
- private SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Traits\Utility\PETTokenFunctionsTrait::isTokenUsed($token)
- Check whether the token is used or not (location_arg set to 1 if used)
- Source
- Parameters
$token (
SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Object\PETToken
) the token’s properties array (i.e. id, type, type_arg, location, location_arg are populated)
- Returns
bool
- private SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Traits\Utility\PETTokenFunctionsTrait::isTokenUsedForPlayer($token, $playerId)
- Checks whether the token is used and in the player's token area
- Source
- Parameters
$token (
SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Object\PETToken
)$playerId (int)
- Returns
bool
- private SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Traits\Utility\PETTokenFunctionsTrait::isTokenBelongingToPlayer($token, $playerId)
- Returns whether the given token belongs to the player or not
- Source
- Parameters
$token (
SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Object\PETToken
)$playerId (int)
- Returns
bool
- private SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Traits\Utility\PETTokenFunctionsTrait::useTokenForPlayer($token, $playerId)
- Helper function to use a token for the given player
- Source
- Parameters
$token (
SwHawk\ProgressEvolutionOfTechnologySWH\Modules\Object\PETToken
)$playerId (int)
- Returns
array