From 882e2c321ff88acac9894b488f1de109758f8f7d Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Wed, 4 Oct 2023 18:56:35 -0600 Subject: initial prompt --- lib/chessh/ssh/client/game/promotion.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/chessh/ssh/client/game/promotion.ex') 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}) -- cgit v1.2.3-70-g09d2