Piece

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

A packed chess piece combining Color and PieceType.

Memory Layout (4 bits total):

  • Bit 3: Color (0 for White, 1 for Black)
  • Bits 0-2: PieceType (1-6)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Piece.type

Members list

Value members

Concrete methods

def apply(color: Color, pieceType: PieceType): Piece

Extensions

Extensions

extension (piece: Piece)
inline def color: Color
inline def pieceType: PieceType