PieceType

dicechess.engine.domain.Models$package.PieceType
object PieceType

Represents chess piece types corresponding to dice values.

Values are 1: Pawn, 2: Knight, 3: Bishop, 4: Rook, 5: Queen, 6: King.

Attributes

Source
Models.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
PieceType.type

Members list

Value members

Concrete methods

def fromDice(value: Int): Option[PieceType]

Converts a dice roll to the corresponding dicechess.engine.domain.PieceType.

Converts a dice roll to the corresponding dicechess.engine.domain.PieceType.

Value parameters

value

dice roll in [1, 6]

Attributes

Returns

Some(pieceType) for valid rolls, None otherwise

Source
Models.scala

Concrete fields

Attributes

Source
Models.scala

Attributes

Source
Models.scala

Attributes

Source
Models.scala

Attributes

Source
Models.scala

Attributes

Source
Models.scala

Attributes

Source
Models.scala
val all: List[PieceType]

All six piece types in dice-value order (Pawn → King). Useful for full-move generation.

All six piece types in dice-value order (Pawn → King). Useful for full-move generation.

Attributes

Source
Models.scala

Givens

Givens

Extensions

Extensions

extension (pt: PieceType)
def asNotation: String

Returns the lowercase FEN character for this piece type (e.g. "n" for Knight).

Returns the lowercase FEN character for this piece type (e.g. "n" for Knight).

Attributes

Source
Models.scala
inline def diceValue: Int

The dice roll value that selects this piece type (1 = Pawn … 6 = King).

The dice roll value that selects this piece type (1 = Pawn … 6 = King).

Attributes

Source
Models.scala