This CLI JavaScript game allows users to play the classic game of rock paper scissors against a computer opponent. The game is implemented using classes, including:
- Game: This class handles the overall flow of the game, including starting and ending the game.
- Round: This class represents a single round of the game, including the choices made by the user and the computer, as well as determining the outcome of the round (win, lose, or draw).
- User: This class represents the user, including their name and choice in the current round.
- Computer: This class represents the computer opponent, including its choice in the current round.
- Choice: This class represents the different choices (rock, paper, scissors) that can be made in the game.
To start the game, create a new instance of the Game class and call the play() method. The user will play against the computer in a series of rounds. The game will continue until the user chooses to quit.
The overall results can be displayed between each round be choosing the RE option.