From f96c2070662fd8b9f1795100bc95748ae678e666 Mon Sep 17 00:00:00 2001 From: Alex Clink Date: Sun, 19 Sep 2021 22:15:34 -0400 Subject: [PATCH] Add docs --- src/lx_chess/term_game.cr | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lx_chess/term_game.cr b/src/lx_chess/term_game.cr index ff06ca3..056d7f7 100644 --- a/src/lx_chess/term_game.cr +++ b/src/lx_chess/term_game.cr @@ -5,6 +5,7 @@ require "./terminal" require "./term_board" module LxChess + # Represents a chess game played through the terminal class TermGame property gb : TermBoard getter log @@ -18,6 +19,11 @@ module LxChess clear_screen end + def tick + draw + update + end + def update input = gets || "" @@ -104,11 +110,6 @@ module LxChess draw_prompt end - def tick - draw - update - end - # =================== # = Drawing methods = # ===================