LogOut becomes a server message (clients just shut the connection now)

This commit is contained in:
Tissevert 2019-12-24 00:36:17 +01:00
parent d32e61f927
commit b62dc4ff28

View file

@ -75,7 +75,6 @@ data FromClient =
| Tadaima {myID :: PlayerID, name :: Text} | Tadaima {myID :: PlayerID, name :: Text}
| Answer {accept :: Bool, to :: PlayerID} | Answer {accept :: Bool, to :: PlayerID}
| Invitation {to :: PlayerID} | Invitation {to :: PlayerID}
| LogOut
| Play {move :: KoiKoi.Move, onGame :: PublicGame} | Play {move :: KoiKoi.Move, onGame :: PublicGame}
| Quit | Quit
| Ping | Ping
@ -198,6 +197,7 @@ data T =
| Welcome {room :: Room, key :: PlayerID} | Welcome {room :: Room, key :: PlayerID}
| Okaeri {room :: Room} | Okaeri {room :: Room}
| LogIn {from :: PlayerID, as :: Text} | LogIn {from :: PlayerID, as :: Text}
| LogOut {from :: PlayerID}
| Game {state :: PublicGame, logs :: [KoiKoi.Action]} | Game {state :: PublicGame, logs :: [KoiKoi.Action]}
| Pong | Pong
| Error {error :: String} | Error {error :: String}