trosada5695
exit on hard
+10 −10
2 files changed
- M README.md +8 −8
- M src/main.c +2 −2
| @@ -6,7 +6,8 @@ The game has 3 difficulty modes: | |||
| 6 | 6 | 3. **Hard**: You lose the game when you make a single wrong guess. | |
| 7 | 7 | ||
| 8 | 8 | ## Levels | |
| 9 | − | - There are total 10 levels and the number of elements the list has depends upon it. The levels are as follows: | |
| 9 | + | - There are total 10 levels and the number of elements the list has depends upon it. | |
| 10 | + | - When you reach the level 10 and make the right guess, You win the game. | |
| 10 | 11 | ||
| 11 | 12 | | Level | Elements | | |
| 12 | 13 | |-------|----------| | |
| @@ -17,11 +18,11 @@ The game has 3 difficulty modes: | |||
| 17 | 18 | | 5 | 17 Elements | | |
| 18 | 19 | | 6 | 20 Elements | | |
| 19 | 20 | | 7 | 23 Elements | | |
| 20 | − | | 8 | 26 Elements | | |
| 21 | − | | 9 | 29 Elements | | |
| 21 | + | | 8 | 26 Elements | | |
| 22 | + | | 9 | 29 Elements | | |
| 22 | 23 | | 10 | 32 Elements | | |
| 23 | 24 | ||
| 24 | − | At the moment the score system is useless, and doesnt really make a difference on the gameplay, but i do plan on adding features, such as high score. | |
| 25 | + | At the moment the score system is useless, and doesn't really make a difference on the gameplay, but i do plan on adding features, such as high score. | |
| 25 | 26 | ||
| 26 | 27 | # TODO | |
| 27 | 28 | - [x] Algorithms to be implemented: | |
| @@ -29,8 +30,7 @@ At the moment the score system is useless, and doesnt really make a difference o | |||
| 29 | 30 | - [x] SelectionSort | |
| 30 | 31 | - [x] InsertionSort | |
| 31 | 32 | - [x] Radix Sort | |
| 32 | − | - [x] Implement Score system | |
| 33 | + | - [ ] Score system | |
| 34 | + | - [x] Implement Score system | |
| 35 | + | - [ ] Make the score system somewhat useful | |
| 33 | 36 | - [ ] Code Refactoring/Cleaning | |
| 34 | − | ||
| 35 | − | ||
| 36 | − | ||
| @@ -94,8 +94,8 @@ void decrement_score(Difficulty diff) { | |||
| 94 | 94 | printf("Wrong Answer!! The score will be decremented by 20\n"); | |
| 95 | 95 | score -= MEDIUM_SCORE_DECREMENT; | |
| 96 | 96 | } else { | |
| 97 | − | printf("Wrong Answer!! The score will be reseted to 0\n"); | |
| 98 | − | score = 0; | |
| 97 | + | printf(COLOR_RED COLOR_BOLD "Wrong Answer!! You Lose!!" COLOR_OFF); | |
| 98 | + | exit(1); | |
| 99 | 99 | } | |
| 100 | 100 | } | |
| 101 | 101 | ||