Square
dicechess.engine.domain.Models$package.Square
object Square
Represents a chess board square index.
The index ranges from 0 (a1) to 63 (h8), mapped row by row (a1, b1... h8).
Attributes
- Source
- Models.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Square.type
Members list
Value members
Concrete methods
Builds a square from coordinate syntax.
Directly injects a pre-validated raw index.
Parses an algebraic square notation string (e.g. "e4") into a dicechess.engine.domain.Square.
Parses an algebraic square notation string (e.g. "e4") into a dicechess.engine.domain.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 - Source
- Models.scala
Givens
Givens
Attributes
- Source
- Models.scala
Extensions
Extensions
extension (sq: Square)
File letter ('a'–'h') derived from the square index.
Raw LERF index in [0, 63] (0 = a1, 63 = h8).
Rank number (1–8) derived from the square index.
Algebraic notation string, e.g. "e4".
In this article