This is my first online web application using JavaScript as part of my Web Developer Training Course at AFPA.
It's a famous game where two players choose between Rock, Paper and Scissors. The winner is the one who has chosen the strongest item:
- Rock beats Scissors
- Scissors beat Paper
- Paper beats Rock
If both players choose the same item, it is a draw.
In this project, the second player is played by the computer. When the first player (the computer's user) accesses the website, he will see a welcoming message asking for his name. His name should be at least 2 characters long and 20 at most, without any number and space in it. The program will then address the player by his name and ask him to choose an item. (His choice is case-insensitive) After checking his answer is valid, the computer's choice will be announced and finally, who is the winner of this round. When one of the player gets 3 victories the game ends, and the player can choose to play again.