diff options
| author | Simponic <loganhunt@simponic.xyz> | 2023-01-04 00:03:38 -0700 |
|---|---|---|
| committer | Simponic <loganhunt@simponic.xyz> | 2023-01-04 00:03:38 -0700 |
| commit | 93ae544684b29db30c6c65a5ba5e7cb51972123c (patch) | |
| tree | 70ea4e1c8fe43a60434d38ec44cb58a9499f3bbc /lib/chessh/ssh/screens/board.ex | |
| parent | 720a110c957a9ac1399ca3d2324b5b2cf8bbf3c6 (diff) | |
| download | chessh-93ae544684b29db30c6c65a5ba5e7cb51972123c.tar.gz chessh-93ae544684b29db30c6c65a5ba5e7cb51972123c.zip | |
Create a Screen module behaviour, some ascii character arts, handle_input does stuff now
Diffstat (limited to 'lib/chessh/ssh/screens/board.ex')
| -rw-r--r-- | lib/chessh/ssh/screens/board.ex | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/chessh/ssh/screens/board.ex b/lib/chessh/ssh/screens/board.ex new file mode 100644 index 0000000..7b22052 --- /dev/null +++ b/lib/chessh/ssh/screens/board.ex @@ -0,0 +1,15 @@ +defmodule Chessh.SSH.Client.Board do + use Chessh.SSH.Client.Screen + alias Chessh.SSH.Client.State + + def render(%State{} = _state) do + @ascii_chars["pieces"]["white"]["knight"] + end + + def handle_input(action, state) do + case action do + "q" -> state + _ -> state + end + end +end |
