Move
Companion object for Move: smart constructors, flag constants, and extension methods.
Flag constants follow the Chess Programming Wiki standard 4-bit encoding, extended with higher bits for promotions. The encoding allows O(1) flag tests using bitwise arithmetic.
Attributes
- Source
- Move.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Move.type
Members list
Value members
Concrete methods
Constructs a new encoded Move from origin, destination, and flags.
Constructs a new quiet Move.
Concrete fields
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
Promotion-capture flags — both Bit 3 and Bit 2 are set.
Promotion flags — Bit 3 is set to distinguish promotions from normal moves.
Promotion flags — Bit 3 is set to distinguish promotions from normal moves.
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
Standard 4-bit move flags — quiet and special moves.
Attributes
- Source
- Move.scala
Attributes
- Source
- Move.scala
A sentinel move encoding a1→a1 with no flags. Used as a zero-value placeholder; never a legal move.
A sentinel move encoding a1→a1 with no flags. Used as a zero-value placeholder; never a legal move.
Attributes
- Source
- Move.scala
Extensions
Extensions
Returns the 4-bit flag of the move.
Returns the starting square of the move.
Returns true if the move is any type of capture.
Returns true if the move is a castling move.
Returns true if the move is an en passant capture.
Returns true if the move is any type of promotion.
Decodes promotion flags to the promoted dicechess.engine.domain.PieceType for API/serialization consumers.
Decodes promotion flags to the promoted dicechess.engine.domain.PieceType for API/serialization consumers.
Keep this mapping aligned with Position-level promotion decoding.
Attributes
- Source
- Move.scala
Returns the raw integer representation of the move.
Returns the destination square of the move.
Long algebraic (UCI) notation, e.g. "e2e4" or "e7e8q" for a queen promotion.
Long algebraic (UCI) notation, e.g. "e2e4" or "e7e8q" for a queen promotion.
Attributes
- Source
- Move.scala