gdamjan / erlang-rpssl-comet

Rock-Paper-Scissors-Spock-Lizard an Erlang Web Game using Mochiweb and the Comet technique
http://damjan.softver.org.mk/rpssl/
MIT License
5 stars 3 forks source link

Implement "join" to a game #3

Open gdamjan opened 14 years ago

gdamjan commented 14 years ago

Curently the user is not aware if he is alone on the game page. Neither does he now against who he is playing.

Implement a "join" AJAX call that will register the player with a nickname. Actually, this should be a Comet callback, so that it waits until the other player joins. Playing shouldn't be allowed until both pladoesn't allow the game to start yers join the game (disabled controls).

When both of the players are "in" the game, inform them about their nicknames and allow for the game to begin.