SENMoveUtilityMethodsTrait
- trait BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait
Methods
- public BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::getMovesStone($x, $y)
- gets all moves available for stone at x,y
- Source
- Returns
array $moves
- public BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::getMovesCharacter($x, $y)
- gets all moves available for character at x,y
- Source
- Returns
array $moves
- public BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::checkSquareExists($x, $y)
- check if square is in board
- Source
- Parameters
$x (int)
$y (int)
- Returns
bool
- public BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::getSquarePlayerId($x, $y)
- gets board_player_id at square x,y
- Source
- Parameters
$x (int)
$y (int)
- Returns
int
- private BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::isPlayerStone($player_id, $x, $y)
- Checks whether the stone at the given coordinates belongs to the given player_id
- Source
- Parameters
$player_id (int)
$x (int)
$y (int)
- Returns
bool
- private BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::isPlayerCharacterStone($player_id, $x, $y)
- Checks whether the stone at the given coordinates belongs to the given player_id and has a character on it
- Source
- Parameters
$player_id (int)
$x (int)
$y (int)
- Returns
bool
- private BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::isViableStoneMove($player_id, $orig_x, $orig_y, $dest_x, $dest_y)
- Checks whether the supplied stone move is a possible move for $player_id
- Source
- Parameters
$player_id (int)
$orig_x (int)
$orig_y (int)
$dest_x (int)
$dest_y (int)
- Returns
bool
- private BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::isViableCharacterMove($player_id, $orig_x, $orig_y, $dest_x, $dest_y)
- Checks whether the supplied character move is a possible move for $player_id
- Source
- Parameters
$player_id (int)
$orig_x (int)
$orig_y (int)
$dest_x (int)
$dest_y (int)
- Returns
bool