Closed iteloo closed 6 years ago
Doing it on the Elm Page seems most natural. Are you worried the WS library will act unexpectedly?
Le 8 févr. 2018 à 11:12, Colin Merkel notifications@github.com a écrit :
Should we do this from Elm, or should we do this from a static HTML page which redirects to the Elm app page once a game is selected? I was thinking to do it in a static page, but I'm not really sure.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I don't really know, maybe it's better to do it that way. I guess you have to wrap the entire game state somehow, so you can select a game and then start it?
By the way, you can easily implement this without server side changes. If you want to join a game with a particular name, just specify ?game=xyz in the websocket request. It will create if it doesn't exist, or else join.
The server also supports automatically generating a game name for you, but you'll have to implement a randomized GenerateGameName here:
Yes, we wrap the currently top-level model inside another union type.
Should we do this from Elm, or should we do this from a static HTML page which redirects to the Elm app page once a game is selected? I was thinking to do it in a static page, but I'm not really sure.