SENMoveUtilityMethodsTrait

trait BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait
Source

modules/php/Utility/SENMoveUtilityMethodsTrait.php#19

Methods

public BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::getMovesStone($x, $y)
gets all moves available for stone at x,y
Source

modules/php/Utility/SENMoveUtilityMethodsTrait.php#27

Returns

array $moves

public BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::getMovesCharacter($x, $y)
gets all moves available for character at x,y
Source

modules/php/Utility/SENMoveUtilityMethodsTrait.php#80

Returns

array $moves

public BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::checkSquareExists($x, $y)
check if square is in board
Source

modules/php/Utility/SENMoveUtilityMethodsTrait.php#128

Parameters
  • $x (int)

  • $y (int)

Returns

bool

public BGAHS\SenseiBGA\Utility\SENMoveUtilityMethodsTrait::getSquarePlayerId($x, $y)
gets board_player_id at square x,y
Source

modules/php/Utility/SENMoveUtilityMethodsTrait.php#141

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

modules/php/Utility/SENMoveUtilityMethodsTrait.php#155

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

modules/php/Utility/SENMoveUtilityMethodsTrait.php#174

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

modules/php/Utility/SENMoveUtilityMethodsTrait.php#196

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

modules/php/Utility/SENMoveUtilityMethodsTrait.php#224

Parameters
  • $player_id (int)

  • $orig_x (int)

  • $orig_y (int)

  • $dest_x (int)

  • $dest_y (int)

Returns

bool