Skip to content

cdmoyer/RubyKnight

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
doc
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Very basic chess engine written in ruby (includes basic xboard and console interface)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages