Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Very basic chess engine written in ruby (includes basic xboard and console interface)
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin Added \!help and startup help
doc
lib
spec ADD rspec, guard, and passing sample tests
.rvmrc ADD require Ruby 1.8.7
Gemfile
Gemfile.lock ADD rspec, guard, and passing sample tests
Guardfile ADD rspec, guard, and passing sample tests
README.markdown Removed standard timing output
Rakefile
TODO cm: stuff done, reformatted
VERSION
profile-gen.rb CM: new

README.markdown

RubyKnight

RubyKnight is a very naive implementation of a chess library and engine.

Installation

gem install rubyknight

Usage

Play Chess

> rubyknight

Write Chess Code

require 'rubygems'
require 'rubyknight'
board = RubyKnight::Board.new

puts board.to_s
print "Enter move: "
$stdin.each do |move|
    move.strip!
    begin
        board.cnotation_move move
    rescue RubyKnight::IllegalMoveException
        print "Enter a real move! #{$!.to_s}\n"
    end
    puts board.to_s
    print "Enter move: "
end
Something went wrong with that request. Please try again.