A multiplayer Rock, Paper, Scissors app developed using Node.JS, JavaScript and Express. Styled with Bootstrap. Tested with Mocha and Chai.
Views | Description |
---|---|
index.ejs | landing page where players register their names |
game.ejs | game page where players make their choices and play |
/game
redirects to /game/new if a game is not in progress
renders the form for next game inputs
shows results of last game if one has happened
takes input to:
Method | Route | Response |
---|---|---|
GET | / | displays a form to register players for a new game |
POST | /game/new | receives the player names |
if player names not valid redirects to / | ||
if player names valid creates new game and redirects to /game | ||
GET | /game | redirects to / if a game is not in progress |
displays the form for next game inputs | ||
shows the result of the last game if one has happened | ||
POST | /game | receives new game data and runs the game |
returns game.ejs with updated game values |