This is the first project based on JS form the Fundaments section from The Odin Project. The project aims to implement the Rock-Paper-Scissors game.
Live demo.
The game rules are described in the following link: https://en.wikipedia.org/wiki/Rock_paper_scissors
Funtion "computerPlay" to return ‘Rock’, ‘Paper’ or ‘Scissors’ randonly. Function "playRound" perform a single fame. Function "playerPlay" ask to the player selects between ‘Rock’, ‘Paper’ or ‘Scissors’. Function "capitalize" capitalize the first letter of player option. Function "game()" register the score and call the previous function. It also present the results to the user.
A UI was created. New functions were created based on events. The js file use DOM to manipulate objects.