Rock paper scissor
Rock paper scissor is a game played between two or more players, in which each player simultaneously selects a shape. The basic version has 3 shapes but the game can be extended with any number of shapes.
- "rock crushes scissors", a player who plays rock wins against the player who chooses scissors
- "scissors cuts paper", scissors wins against paper
- "paper cover rocks", paper winds agains rock
If all players choose the same shape, the game is tied and repeated.
If there are more than two players, each selects a shape, players whose shape does not win against any other player are eliminated from the game until there's one winner
The game can be played as
- human vs computer (any number)
- computer vs computer (any number)
- More than two players might not be implemented yet
Clone the repo and run npm install
npm start
- Visit
http://localhost:5000
The code is not using any external dependency or library except for a ES6 transpiler.
npm start
to tweak the UI, serves static files inclient
npm run dev
runs karma test runner and waits for your browser to connect for JS unit tests