Start removing deprecated data from protocol messages

This commit is contained in:
Tissevert 2019-10-23 17:46:33 +02:00
parent 43b0200304
commit 816ecbc331

View file

@ -69,7 +69,7 @@ instance ToJSON Hanafuda.Card where
toEncoding = genericToEncoding defaultOptions toEncoding = genericToEncoding defaultOptions
data FromClient = data FromClient =
Answer {accept :: Bool} Answer {accept :: Bool, to :: PlayerID}
| Invitation {to :: PlayerID} | Invitation {to :: PlayerID}
| LogIn {name :: Text} | LogIn {name :: Text}
| LogOut | LogOut
@ -205,7 +205,6 @@ instance ToJSON PublicGame where
data T = data T =
Relay {from :: PlayerID, message :: FromClient} Relay {from :: PlayerID, message :: FromClient}
| Welcome {room :: Room, key :: PlayerID} | Welcome {room :: Room, key :: PlayerID}
| Update {alone :: [PlayerID], paired :: [PlayerID]}
| Game {state :: PublicGame, logs :: [KoiKoi.Action]} | Game {state :: PublicGame, logs :: [KoiKoi.Action]}
| Pong | Pong
| Error {error :: String} | Error {error :: String}