Open devgianlu opened 6 years ago
Not a bad idea, though if more stuff can be added to links, I'd like to do it in a more extensible manner so some of the other things from #160 would be easier to add (though they definitely don't all have to be done at once).
Right now, the game number stuff is handled directly in the JS when the page first loads. I don't know if extending that (and potentially adding more fields to the handlers that get called when the page loads) or adding another servlet endpoint that sets up the internal session object correctly so that the existing "reconnect to game" logic works would be better.
The idea of having a command line type of thing with an URL isn't bad at all. If I come up with any idea I'll try to implement it and open a pull request.
Right now sharing a game is pretty hacky. A "ShareHandler" may be used to generate an unique link (like Google URL Shortener does) that will redirect to the correct game without having to insert the password. They could also behave like an invite: everyone with that link can join the game, or can be restricted to a number of player (or certain player names). If you're interested I can work on that.