This commit is contained in:
Alex Clink 2021-09-13 23:19:09 -04:00
parent b056d2d445
commit 63679d2f67
5 changed files with 11 additions and 0 deletions

View file

@ -24,6 +24,11 @@ OptionParser.parse do |parser|
exit
end
parser.on("-v", "--version", "show version information") do
puts "lx_chess version #{LxChess::VERSION}"
exit
end
parser.invalid_option do |flag|
STDERR.puts "ERROR: #{flag} is not a valid option."
STDERR.puts parser

View file

@ -1,6 +1,8 @@
require "./piece"
module LxChess
# A *Board* represents the squares of a chess board. it also handles coversion of
# indicies <=> cords. The internal representation is a contiguous array
class Board
include Enumerable(Piece | Nil)

View file

@ -3,6 +3,7 @@ require "./piece"
require "./error"
module LxChess
# Forsyth-Edwards Notation parser and converter
class Fen
class InvalidFen < Error; end

View file

@ -5,6 +5,7 @@ require "./move_set"
require "./error"
module LxChess
# Represents a standard game of Chess
class Game
class SanError < Error; end

View file

@ -3,6 +3,8 @@ require "./piece"
require "./board"
module LxChess
# Parses Standard Algebraic Notation
# ex: `Pbxc8=Q` pawn on the b file takes c8 and promotes to Queen
class Notation
class InvalidNotation < Error; end