parent
b47cf8261f
commit
604df1aa41
@ -0,0 +1,29 @@
|
||||
# Rock, Paper and Scissors
|
||||
|
||||
**Tier:** 1-Beginner
|
||||
|
||||
Rock, paper, scissors is a game we all have played IRL. Now let's use our fundamental knowledge of programming to create it in code.Loops, if conditions and a simple algorithm will be used.
|
||||
Your task is to let the user input one option between rock, paper and scissors. The other opponent's option will be randomly generated from the code. Only two outcomes are possible - a draw or a win for one player and a loss for the other player.
|
||||
Use an algorithm that would find the winner and restart the game.
|
||||
|
||||
## User Stories
|
||||
|
||||
- [ ] User can enter a value from [rock, paper, scissor]
|
||||
- [ ] User can see the randomly genrated opponents option
|
||||
- [ ] User can view the outcome of the game
|
||||
|
||||
## Bonus features
|
||||
|
||||
- [ ] Change the game to be for 10 moves. Who wins will get 1 point everytime. At the end of the 10 moves, declare the winner and restart the game.
|
||||
|
||||
## Useful links and resources
|
||||
|
||||
- [If, else condition](https://www.w3schools.com/js/js_if_else.asp)
|
||||
- [Math functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math)
|
||||
- [Loops and iterations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration)
|
||||
- [Loop exercise](https://contactmentor.com/js-loop-exercises-solutions/)
|
||||
|
||||
## Example projects
|
||||
|
||||
- [Game reference in JS](https://www.geeksforgeeks.org/rock-paper-and-scissor-game-using-javascript/)
|
||||
- [Game reference in Python](https://thehelloworldprogram.com/python/python-game-rock-paper-scissors/)
|
Loading…
Reference in new issue