https://github.com/nikumu/the-final-brain-cell
Number Guessing Game in C++
https://github.com/nikumu/the-final-brain-cell
c-plus-plus cpp game open-source
Last synced: about 1 year ago
JSON representation
Number Guessing Game in C++
- Host: GitHub
- URL: https://github.com/nikumu/the-final-brain-cell
- Owner: nikumu
- License: apache-2.0
- Created: 2024-10-17T10:32:39.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-19T00:34:37.000Z (over 1 year ago)
- Last Synced: 2024-10-19T14:26:46.896Z (over 1 year ago)
- Topics: c-plus-plus, cpp, game, open-source
- Language: C++
- Homepage:
- Size: 492 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The Final Brain Cell
Game based on a guessing system, where the player has a limited number of attempts to guess a random number. Each incorrect attempt 'eliminates' a brain cell, and the player loses when all brain cells are depleted.
## Explanation
### Difficulty levels
* The player can choose between three levels:
* Easy: Number between 1 and 10, 7 attempts.
* Medium: Number between 1 and 20, 5 attempts.
* Hard: Number between 1 and 50, 3 attempts.
* The selected difficulty level defines the range of the number to guess and the number of available attempts.
### Scoring system
* The score is calculated based on the remaining attempts. The more brain cells (attempts) the player has left at the end, the higher the score.
* Formula: (remaining attempts * 50) / initial attempts.
With these changes, the game offers a greater challenge and encourages the player to maintain as many "brain cells" as possible to achieve a high score!
### To compile the C++ code
```
g++ the-final-brain-cell.cpp -o the-final-brain-cell
```
### To run the compiled program
```
./the-final-brain-cell
```
### Example