A CLI based number guessing game using typescript and published as an executable npm package, complete problem statement is available here.
This project is published as an npm package. To use follow these steps.
-
Install as an npm package
npm i wmd-ts-number-game
-
Run the app after installation
wmd-ts-number-game
-
Use the app as an npx package
npx wmd-ts-number-game
-
How to play :
- A randowm number between 1 to 20 will be generated
- To win, guess the number
- You can play in any of the following mode
-
Modes :
- Newbie :
- Unlimited number of tries
- A hint on each wrong guess
- Number to guess remains the same on wrong guess
- Beginner :
- Limited (10) number of tries
- A hint on each wrong guess
- Number to guess remains the same on wrong guess
- Proficient :
- Limited (8) number of tries
- No hint after wrong guess
- Number to guess remains the same on wrong guess
- Expert :
- Limited (5) number of tries
- No hint after wrong guess
- Number to guess changes on wrong guess
- Newbie :
All the details to code this app is given here.