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
1 changed files with 2 additions and 3 deletions

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