diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2023-01-13 17:02:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 17:02:31 -0700 |
commit | b1b62f154ab5f74a9217dbf5a6422640ac929df3 (patch) | |
tree | 6fa3b6e8d7e9219decda28948bf3f02c3cf2dab2 /lib/chessh/ssh/screens/board.ex | |
parent | fdc22875284b78f9fb98993cbe44ce893c0de413 (diff) | |
parent | 3a6c603b0b12964d8a04ae4f78fb61bc094adf12 (diff) | |
download | chessh-b1b62f154ab5f74a9217dbf5a6422640ac929df3.tar.gz chessh-b1b62f154ab5f74a9217dbf5a6422640ac929df3.zip |
Merge pull request #3 from Simponic/draw_board
Draw board
Diffstat (limited to 'lib/chessh/ssh/screens/board.ex')
-rw-r--r-- | lib/chessh/ssh/screens/board.ex | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/chessh/ssh/screens/board.ex b/lib/chessh/ssh/screens/board.ex deleted file mode 100644 index c95049f..0000000 --- a/lib/chessh/ssh/screens/board.ex +++ /dev/null @@ -1,31 +0,0 @@ -defmodule Chessh.SSH.Client.Board do - alias Chessh.SSH.Client - alias IO.ANSI - - require Logger - - defmodule State do - defstruct cursor_x: 0, - cursor_y: 0 - end - - use Chessh.SSH.Client.Screen - - def render(%Client.State{} = _state) do - knight = @ascii_chars["pieces"]["white"]["knight"] - - [ANSI.home()] ++ - Enum.map( - Enum.zip(0..(length(knight) - 1), knight), - fn {i, line} -> - [ANSI.cursor(i, 0), line] - end - ) - end - - def handle_input(action, %Client.State{} = state) do - case action do - _ -> state - end - end -end |