diff --git a/src/Hanafuda/Message.hs b/src/Hanafuda/Message.hs index 8dd83cc..4506a7f 100644 --- a/src/Hanafuda/Message.hs +++ b/src/Hanafuda/Message.hs @@ -80,6 +80,9 @@ data FromClient = | Answer {accept :: Bool, to :: PlayerID} | Invitation {to :: PlayerID} | Play {move :: KoiKoi.Move, onGame :: PublicGame} + | Share {gameSave :: PublicGame} + | Sync {latestKnown :: Coordinates, to :: PlayerID} + | Yield {onGameID :: GameID, to :: PlayerID} | Quit | Ping deriving (Generic, Show) @@ -196,6 +199,7 @@ instance ToJSON ByteString where data PublicGame = PublicGame { nonce :: ByteString + , logs :: [KoiKoi.Action] , playerHand :: Hanafuda.Pack , private :: ByteString , public :: PublicState @@ -212,7 +216,7 @@ data T = | Okaeri {room :: Room} | LogIn {from :: PlayerID, as :: Text} | LogOut {from :: PlayerID} - | Game {state :: PublicGame, logs :: [KoiKoi.Action]} + | Game {state :: PublicGame} | Pong | Error {error :: String} deriving (Generic)