No need to separate connection and logIn now that names are non-unique and the PlayerID is known from the start

This commit is contained in:
Tissevert 2019-11-05 18:13:13 +01:00
parent 9c5c80fb3a
commit 775abd3ac4

View file

@ -68,11 +68,10 @@ instance ToJSON Hanafuda.Card where
toEncoding = genericToEncoding defaultOptions
data FromClient =
Hello
| Tadaima {myID :: PlayerID}
Hello {name :: Text}
| Tadaima {myID :: PlayerID, name :: Text}
| Answer {accept :: Bool, to :: PlayerID}
| Invitation {to :: PlayerID}
| LogIn {name :: Text}
| LogOut
| Play {move :: KoiKoi.Move, onGame :: PublicGame}
| Quit