1.0.1 • Published 1 year ago
ts-01-guessinggame v1.0.1
TypeScript-project01_Random Number Generated
TS Project 01 – Number Guessing Game:
Description:
This guess the number game is a short TypeScript/Node.js project that allows the user to guess the number generated by the computer. There are also several ways to alter the game, like adding more rounds or displaying the score. It’s quite simple and uses the random function to generate a number.
What we know from the description:
- Number Game.
- Console based
- Computers generate number with random function
- Users guess the number
- Check / compare the input of user with computer generated number
- Add Rounds
- Display score
Project / Game Flow:
- Welcome message.
- Starting round message
- Computers generate number
- Set the Round Number to 0
- Set the score to 0
Ask user to enter his guess “Please enter your Guess between 1 – 100.”
Compare the guess and show result accordingly
Check the Round Number
Ask user if he is wanting to play again a. If yes move back to 2 steps b. Else exit the game/ end the game.