Method: Chess::Board#stalemate?

Defined in:
ext/chess.c

#stalemate?Boolean

Returns ‘true` if the pieces of the color that has the turn are in stalemate, `false` otherwise.

Returns:

  • (Boolean)


500
501
502
503
504
505
506
507
508
509
# File 'ext/chess.c', line 500

VALUE
board_stalemate (VALUE self)
{
  Board *board;
  Data_Get_Struct (self, Board, board);
  if (stalemate (board, board->active_color))
    return Qtrue;
  else
    return Qfalse;
}