Module: RGnuchess
- Defined in:
- lib/rgnuchess.rb
Overview
This module contains classes for interfacing with the program ‘gnuchess’.
Usage
To use this module, create an instance of RGnuchess::Gnuchess.
gc = RGnuchess::Gnuchess.new
Then, you can load a board:
gc.load("board.epd")
And ask what the board looks like:
board = gc.board
puts board.to_s
Or ask for moves:
moves = gc.moves
Or even make or undo moves:
gc.make_move( moves.first )
gc.undo
Defined Under Namespace
Classes: Board, Gnuchess, InvalidMoveException, Move