Play against another player in rock-paper-scissors. Or just watch two different players play it.
- Log in with your user name and password.
- Choose whether you want to be a player or a watcher.
- Both players and watchers can comment in the chat during the game.
- Watchers appear on the Watch List.
- Watchers who want to play can move themselves to the Wait List.
- If there are more than 2 players, then any other users wanting to play are moved to the Wait List.
- Otherwise, the players will appear as Player 1 and Player 2.
- Each player can choose whether to roll rock, paper, or scissors by clicking the respective buttons for those.
- Once both players have picked their play, the winner is determined.
- Players can choose whether to continue or to leave the game after the match is over.
- Anyone logged in can use the chat.
- Trash talk is allowed.
- There is no moderation for words, so please watch your language.
While a single player rock-paper-scissors game is possible when playing against the computer with a random roll of rock, paper, or scissors, implementing two human players would not be possible with just client-side code.
To allow for multiple human players, I utilized Firebase and a login system so that anyone who accesses the site is required to log in. This allows the system to track who is currently playing the game, who is waiting to play, and who is currently watching the game.
Additionally, in addition to player data, the Firebase system also allows me to keep track of whether each player has picked rock, paper, or scissors, as well as allow the chat log to be seen by all logged in users.