Square
Represents a chess board square index.
The index ranges from 0 (a1) to 63 (h8), mapped row by row (a1, b1... h8).
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Square.type
Members list
Value members
Concrete methods
Builds a square from coordinate syntax.
Builds a square from coordinate syntax.
Attributes
Directly injects a pre-validated raw index.
Directly injects a pre-validated raw index.
Attributes
Parses an algebraic square notation string (e.g. "e4") into a Square.
Parses an algebraic square notation string (e.g. "e4") into a Square.
Value parameters
- notation
-
two-character string: file letter
a–hfollowed by rank digit1–8
Attributes
- Returns
-
Some(square)if the notation is valid,Noneotherwise
Extensions
Extensions
File letter ('a'–'h') derived from the square index.
File letter ('a'–'h') derived from the square index.
Attributes
Raw LERF index in [0, 63] (0 = a1, 63 = h8).
Raw LERF index in [0, 63] (0 = a1, 63 = h8).
Attributes
Rank number (1–8) derived from the square index.
Rank number (1–8) derived from the square index.
Attributes
Algebraic notation string, e.g. "e4".
Algebraic notation string, e.g. "e4".