mirror of
https://github.com/SleepingInsomniac/lx_chess_cr
synced 2025-01-31 19:57:54 +01:00
Add docs
This commit is contained in:
parent
ced238add0
commit
f96c207066
1 changed files with 6 additions and 5 deletions
|
@ -5,6 +5,7 @@ require "./terminal"
|
||||||
require "./term_board"
|
require "./term_board"
|
||||||
|
|
||||||
module LxChess
|
module LxChess
|
||||||
|
# Represents a chess game played through the terminal
|
||||||
class TermGame
|
class TermGame
|
||||||
property gb : TermBoard
|
property gb : TermBoard
|
||||||
getter log
|
getter log
|
||||||
|
@ -18,6 +19,11 @@ module LxChess
|
||||||
clear_screen
|
clear_screen
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def tick
|
||||||
|
draw
|
||||||
|
update
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
input = gets || ""
|
input = gets || ""
|
||||||
|
|
||||||
|
@ -104,11 +110,6 @@ module LxChess
|
||||||
draw_prompt
|
draw_prompt
|
||||||
end
|
end
|
||||||
|
|
||||||
def tick
|
|
||||||
draw
|
|
||||||
update
|
|
||||||
end
|
|
||||||
|
|
||||||
# ===================
|
# ===================
|
||||||
# = Drawing methods =
|
# = Drawing methods =
|
||||||
# ===================
|
# ===================
|
||||||
|
|
Loading…
Add table
Reference in a new issue