From e3c85e6920c3aab5b9f09597cb1b9812ed1147c9 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Wed, 29 Apr 2020 21:14:03 -0400 Subject: [PATCH] Euchre::Dealer: Add is_spectator flag to game msg For clients who want an easy way to decide how to render the player. --- lib/Euchre/Dealer.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Euchre/Dealer.pm b/lib/Euchre/Dealer.pm index ab3471c..0b750a8 100644 --- a/lib/Euchre/Dealer.pm +++ b/lib/Euchre/Dealer.pm @@ -596,6 +596,7 @@ sub broadcast_gamestate { msg_type => 'game_state', game => $msg, hand => $p->{hand}, + is_spectator => (exists $p->{seat}) ? 0 : 1, sit_out => $p->{sit_out}, }; $p->{ws}->send({ json => $json }); -- libgit2 1.1.1