fixed problem found in review
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Andre Henriques 2024-01-16 23:50:32 +00:00
parent 47c040e75f
commit 3d835aad6c

View File

@ -140,13 +140,13 @@ defmodule Server do
state = qurey_status(state) state = qurey_status(state)
game = state.games[game_id] game = state.games[game_id]
cond do cond do
game.modified ->
safecast(pid_to_inform, {:make_move, game_id, :player_moved_before, game.game_state, game.hand})
set_modifed(state, game_id)
is_finished(game, game_id) -> is_finished(game, game_id) ->
{_, score} = state.games[game_id] {_, score} = state.games[game_id]
safecast(pid_to_inform, {:make_move, game_id, :game_finished, score}) safecast(pid_to_inform, {:make_move, game_id, :game_finished, score})
state state
game.modified ->
safecast(pid_to_inform, {:make_move, game_id, :player_moved_before, game.game_state, game.hand})
set_modifed(state, game_id)
true -> true ->
try_to_play(state, game_id, move, pid_to_inform) try_to_play(state, game_id, move, pid_to_inform)
end end