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

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 PieceType.

Converts a dice roll to the corresponding PieceType.

Value parameters

value

dice roll in [1, 6]

Attributes

Returns

Some(pieceType) for valid rolls, None otherwise

Concrete fields

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

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

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