diff options
author | Jasper Van der Jeugt | 2020-07-31 13:35:17 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-07-31 13:35:17 +0200 |
commit | 323ca81c96e4186747f06b6178d71d49e98c6066 (patch) | |
tree | 3d52febe85476fe31d64371e8335539c06ec83b3 /server/lib/Cafp/Messages.hs | |
parent | 88e5fd7b4701fcfc9dd355208435a37bf129a92f (diff) |
Sync opponent proposals
Diffstat (limited to 'server/lib/Cafp/Messages.hs')
-rw-r--r-- | server/lib/Cafp/Messages.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/lib/Cafp/Messages.hs b/server/lib/Cafp/Messages.hs index ff3f612..dc17168 100644 --- a/server/lib/Cafp/Messages.hs +++ b/server/lib/Cafp/Messages.hs @@ -3,6 +3,7 @@ module Cafp.Messages ( BlackCard (..) , WhiteCard (..) , Cards (..) + , Opponent (..) , TableView (..) , GameView (..) , ServerMessage (..) @@ -22,12 +23,17 @@ data Cards = Cards , cardsWhite :: Vector Text } deriving (Show) +data Opponent = Opponent + { opponentName :: Text + , opponentReady :: Bool + } deriving (Show) + data TableView = Proposing BlackCard (Maybe WhiteCard) deriving (Show) data GameView = GameView - { gameViewOpponents :: [Text] + { gameViewOpponents :: [Opponent] , gameViewMyName :: Text , gameViewTable :: TableView , gameViewHand :: [WhiteCard] @@ -48,6 +54,7 @@ data ClientMessage deriveBoth defaultOptions ''BlackCard deriveBoth defaultOptions ''WhiteCard deriveBoth (defaultOptionsDropLower 5) ''Cards +deriveBoth (defaultOptionsDropLower 8) ''Opponent deriveBoth defaultOptions ''TableView deriveBoth (defaultOptionsDropLower 8) ''GameView deriveBoth defaultOptions ''ServerMessage |