Class Move
In: lib/bangkok/move.rb
Parent: Object

A Move is a single piece’s move in a chess match. There are two Move objects created for each chess match move: one for white and one for black.

Methods

Attributes

color  [R] 
from_rank_or_file  [R] 
modifier  [R] 
piece  [R] 
square  [R] 

Public Class methods

Parse the chess piece move text and set piece, square, and modifier.

Public Instance methods

Returns true if this move was a bad one

Returns true if this move was a blunder

Returns true if this is a capture

Returns true if this is a castle (either side)

Returns true if this move results in a check

Returns true if this move results in a checkmate

Returns true if this move was a good one

Returns true if @modifier is not null and includes str.

Returns true if this is a kingside castle

Returns true if this move results in a pawn promotion

Returns true if this is a queenside castle

[Validate]