Skip to content

Commit d73d127

Browse files
committed
docs: update README.md and add project license
1 parent 1bdef4f commit d73d127

File tree

2 files changed

+88
-1
lines changed

2 files changed

+88
-1
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Archit Kumar
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
11
# Number Guessing Game
22

3-
A CLI based game where computer randomly selects a number and the user has to guess it.
3+
Number Guessing is a CLI game where the computer randomly selects a number
4+
and the user has to guess it. The user is given a limited number of chances to guess the number.
5+
If the user guesses the number correctly, the game ens, and the user wins. Otherwise,
6+
the game continues until the user runs out of chances.
7+
</br>
8+
</br>
9+
This is a learning project built in Go as part of [roadmap.sh](https://roadmap.sh/projects/number-guessing-game) challenge.
10+
11+
## Features
12+
13+
- Multiple Difficulty levels (easy, medium, hard)
14+
- Input Validation
15+
16+
## Requirements
17+
18+
- Go 1.19 or later
19+
20+
## Installation
21+
22+
Run the following commands
23+
24+
```bash
25+
git clone https://github.com/architxkumar/Number-Guessing.git
26+
cd Number-Guessing
27+
go build
28+
```
29+
30+
## Usage
31+
```bash
32+
./Number-Guessing
33+
```
34+
### Sample Output
35+
```text
36+
Welcome to Number Guessing Game!
37+
I'm thinking of a number between 1 and 100.
38+
You have limited number of chances to guess the correct number depending upon the difficulty level.
39+
40+
Please select the difficulty level.
41+
1. Easy (10)
42+
2. Medium (5)
43+
3. Hard (3)
44+
45+
Enter your choice: 2
46+
47+
Great! You have selected the Medium level.
48+
Let's start the game!
49+
50+
51+
Enter your guess: 27
52+
Incorrect! The number is greater than 27
53+
54+
Enter your guess: 60
55+
Incorrect! The number is greater than 60
56+
57+
Enter your guess: 90
58+
Incorrect! The number is less than 90
59+
60+
Enter your guess: 85
61+
Incorrect! The number is less than 85
62+
63+
Enter your guess: 87
64+
Game Over! You have used all the attempts
65+
```
66+
67+
## License
68+
69+
This project is licensed under the [MIT License](./LICENSE)

0 commit comments

Comments
 (0)