From ada569514b2b55215cbc81010517f1f4a205c9ce Mon Sep 17 00:00:00 2001 From: krolyxon Date: Fri, 1 Sep 2023 13:11:59 +0530 Subject: [PATCH] exit on hard --- README.md | 16 ++++++++-------- src/main.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c1ffaf3..dfb27ae 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ The game has 3 difficulty modes: 3. **Hard**: You lose the game when you make a single wrong guess. ## Levels -- There are total 10 levels and the number of elements the list has depends upon it. The levels are as follows: +- There are total 10 levels and the number of elements the list has depends upon it. +- When you reach the level 10 and make the right guess, You win the game. | Level | Elements | |-------|----------| @@ -17,11 +18,11 @@ The game has 3 difficulty modes: | 5 | 17 Elements | | 6 | 20 Elements | | 7 | 23 Elements | -| 8 | 26 Elements | -| 9 | 29 Elements | +| 8 | 26 Elements | +| 9 | 29 Elements | | 10 | 32 Elements | -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. +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. # TODO - [x] Algorithms to be implemented: @@ -29,8 +30,7 @@ At the moment the score system is useless, and doesnt really make a difference o - [x] SelectionSort - [x] InsertionSort - [x] Radix Sort -- [x] Implement Score system +- [ ] Score system + - [x] Implement Score system + - [ ] Make the score system somewhat useful - [ ] Code Refactoring/Cleaning - - - diff --git a/src/main.c b/src/main.c index 2de0f4c..e3b7ed9 100644 --- a/src/main.c +++ b/src/main.c @@ -94,8 +94,8 @@ void decrement_score(Difficulty diff) { printf("Wrong Answer!! The score will be decremented by 20\n"); score -= MEDIUM_SCORE_DECREMENT; } else { - printf("Wrong Answer!! The score will be reseted to 0\n"); - score = 0; + printf(COLOR_RED COLOR_BOLD "Wrong Answer!! You Lose!!" COLOR_OFF); + exit(1); } }