On this page:
chess-piece?
1.1 Uncolored Chess Pieces
uncolored-chess-piece?
pawn
knight
bishop
rook
queen
king
uncolored-chess-pieces
1.2 Colored Chess Pieces
colored-chess-piece?
white-pawn
white-knight
white-bishop
white-rook
white-queen
white-king
black-pawn
black-knight
black-bishop
black-rook
black-queen
black-king
colored-chess-piece
colored-chess-piece-type
colored-chess-piece-owner
colored-chess-pieces
1.3 Chess Colors
chess-color?
white
black
8.12

1 Chess Pieces and Colors🔗ℹ

 (require chess/piece) package: chess

A chess piece is a pawn, knight, bishop, rook, queen, or king. They come in two flavors:

procedure

(chess-piece? v)  boolean?

  v : any/c
A predicate for chess pieces.

1.1 Uncolored Chess Pieces🔗ℹ

procedure

(uncolored-chess-piece? v)  boolean?

  v : any/c
A predicate for uncolored chess pieces. Implies chess-piece?.

Constants representing uncolored chess pieces.

An immutable set of all possible uncolored chess pieces.

1.2 Colored Chess Pieces🔗ℹ

procedure

(colored-chess-piece? v)  boolean?

  v : any/c
A predicate for colored chess pieces. Implies chess-piece?.

Constants representing colored chess pieces.

procedure

(colored-chess-piece #:type type    
  #:owner owner)  colored-chess-piece?
  type : uncolored-chess-piece?
  owner : chess-color?
Returns the colored chess piece corresponding to a type piece with owner as its color.

Example:
> (colored-chess-piece #:type pawn #:owner white)

(colored-chess-piece #:owner #<white> #:type #<pawn>)

Returns the type of piece, as an uncolored chess piece.

Example:

procedure

(colored-chess-piece-owner piece)  chess-color?

  piece : colored-chess-piece?
Returns the chess color that owns piece.

Example:

An immutable set of all possible colored chess pieces.

1.3 Chess Colors🔗ℹ

A chess color is either white or black.

procedure

(chess-color? v)  boolean?

  v : any/c
A predicate for chess colors.

Constants representing the two chess colors.