mirror of
https://github.com/SleepingInsomniac/lx_chess_cr
synced 2024-11-16 19:49:34 +01:00
Add docs
This commit is contained in:
parent
b056d2d445
commit
63679d2f67
5 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ require "./piece"
|
|||
require "./error"
|
||||
|
||||
module LxChess
|
||||
# Forsyth-Edwards Notation parser and converter
|
||||
class Fen
|
||||
class InvalidFen < Error; end
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ require "./move_set"
|
|||
require "./error"
|
||||
|
||||
module LxChess
|
||||
# Represents a standard game of Chess
|
||||
class Game
|
||||
class SanError < Error; end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue