summaryrefslogtreecommitdiff
path: root/lib/chessh/ssh/client/game
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-04 18:56:35 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-04 18:56:35 -0600
commit882e2c321ff88acac9894b488f1de109758f8f7d (patch)
treebc779ed8a9b23dc54cf1edd4a40e3396d8781c45 /lib/chessh/ssh/client/game
parent48dd80dbf745bd0bb0bd0186ad126d74f66b872b (diff)
downloadchessh-882e2c321ff88acac9894b488f1de109758f8f7d.tar.gz
chessh-882e2c321ff88acac9894b488f1de109758f8f7d.zip
initial prompt
Diffstat (limited to 'lib/chessh/ssh/client/game')
-rw-r--r--lib/chessh/ssh/client/game/game.ex1
-rw-r--r--lib/chessh/ssh/client/game/previous_game.ex1
-rw-r--r--lib/chessh/ssh/client/game/promotion.ex5
3 files changed, 5 insertions, 2 deletions
diff --git a/lib/chessh/ssh/client/game/game.ex b/lib/chessh/ssh/client/game/game.ex
index 738832e..6103439 100644
--- a/lib/chessh/ssh/client/game/game.ex
+++ b/lib/chessh/ssh/client/game/game.ex
@@ -221,6 +221,7 @@ defmodule Chessh.SSH.Client.Game do
_width,
_height,
action,
+ _data,
%State{
move_from: move_from,
cursor: %{x: cursor_x, y: cursor_y} = cursor,
diff --git a/lib/chessh/ssh/client/game/previous_game.ex b/lib/chessh/ssh/client/game/previous_game.ex
index 73de868..3582cc9 100644
--- a/lib/chessh/ssh/client/game/previous_game.ex
+++ b/lib/chessh/ssh/client/game/previous_game.ex
@@ -57,6 +57,7 @@ defmodule Chessh.SSH.Client.PreviousGame do
_width,
_height,
action,
+ _data,
%State{
move_idx: move_idx,
flipped: flipped,
diff --git a/lib/chessh/ssh/client/game/promotion.ex b/lib/chessh/ssh/client/game/promotion.ex
index c4cece6..693ec3f 100644
--- a/lib/chessh/ssh/client/game/promotion.ex
+++ b/lib/chessh/ssh/client/game/promotion.ex
@@ -47,11 +47,12 @@ defmodule Chessh.SSH.Client.Game.PromotionScreen do
def input(
_,
_,
- action,
+ _,
+ data,
%State{client_pid: client_pid, game_pid: game_pid, game_state: %Game.State{} = game_state} =
state
) do
- promotion = if Enum.member?(["q", "b", "n", "r"], action), do: action, else: nil
+ promotion = if Enum.member?(["q", "b", "n", "r"], data), do: data, else: nil
if promotion do
send(client_pid, {:go_back_one_screen, game_state})