minor corrections and addition of more deck UI controls. Minor testing

This commit is contained in:
2020-09-17 14:23:12 -06:00
parent f8583ab99e
commit b395dfaf82
3 changed files with 25 additions and 8 deletions

View File

@@ -346,7 +346,12 @@ my $server = Net::WebSocket::Server->new(
# each card (so we scale better)
if (@hand) { for (@hand) {
my $card = $_;
$current->send_utf8('{"action":"addCard","hand":"'.$handID.'", "card":"'.$card.'"}');
my %message = (
action => "addCard",
hand => $handID,
card => $card
);
$current->send_utf8(to_json(\%message));
}}
}
}}}
@@ -371,7 +376,7 @@ my $server = Net::WebSocket::Server->new(
$conn->send_utf8('{"info":"hand returned to deck","request":"update"}');
}
if ($messageData->{action} =~ /shuffle/) {
shuffleDeck($conn->{session},$messageData->{action});
shuffleDeck($conn->{session},$messageData->{deck});
$conn->send_utf8('{"info":"deck shuffeled","request":"update"}');
}
if ($messageData->{action} =~ /add/) {