|
| __construct (int $square1, int $square2) |
| Can be used, but for chaining ::new is probably better.
|
|
| getDistance () |
| Get the distance between 2 squares.
|
|
| haveSameRank () |
| Returns whether two squares are on the same rank.
|
|
| haveSameFile () |
| Returns whether two squares are on the same file.
|
|
|
static | new (int $square1, int $square2) |
| For chaining.
|
|
◆ __construct()
MediaWiki\Extension\ChessBrowser\SquareRelations::__construct |
( |
int | $square1, |
|
|
int | $square2 ) |
Can be used, but for chaining ::new is probably better.
- Parameters
-
int | $square1 | Square as byte number where in Hex notation the first four bits (0xF0) are rank [1-8] and the second 4 bits (0x0F) are file [a-h] |
int | $square2 | Square as byte number where in Hex notation the first four bits (0xF0) are rank [1-8] and the second 4 bits (0x0F) are file [a-h] |
◆ getDistance()
MediaWiki\Extension\ChessBrowser\SquareRelations::getDistance |
( |
| ) |
|
Get the distance between 2 squares.
- Returns
- int
◆ haveSameFile()
MediaWiki\Extension\ChessBrowser\SquareRelations::haveSameFile |
( |
| ) |
|
Returns whether two squares are on the same file.
- Returns
- bool
◆ haveSameRank()
MediaWiki\Extension\ChessBrowser\SquareRelations::haveSameRank |
( |
| ) |
|
Returns whether two squares are on the same rank.
- Returns
- bool
◆ new()
static MediaWiki\Extension\ChessBrowser\SquareRelations::new |
( |
int | $square1, |
|
|
int | $square2 ) |
|
static |
For chaining.
- Parameters
-
- Returns
- SquareRelations
The documentation for this class was generated from the following file:
- includes/SquareRelations.php