Krolyxon
Commit ada5695

Branches

Refs →

trosada5695

exit on hard

Author
krolyxon
Date
2023-09-01 13:11 +0530
Parent
c82d237
Commit
ada569514b2b55215cbc81010517f1f4a205c9ce

+10 −10

2 files changed

  1. M README.md +8 −8
  2. M src/main.c +2 −2
M README.md View
@@ -6,7 +6,8 @@ The game has 3 difficulty modes:
66 3. **Hard**: You lose the game when you make a single wrong guess.
77
88 ## 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.
1011
1112 | Level | Elements |
1213 |-------|----------|
@@ -17,11 +18,11 @@ The game has 3 difficulty modes:
1718 | 5 | 17 Elements |
1819 | 6 | 20 Elements |
1920 | 7 | 23 Elements |
20−| 8 | 26 Elements |
21−| 9 | 29 Elements |
21+| 8 | 26 Elements |
22+| 9 | 29 Elements |
2223 | 10 | 32 Elements |
2324
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.
2526
2627 # TODO
2728 - [x] Algorithms to be implemented:
@@ -29,8 +30,7 @@ At the moment the score system is useless, and doesnt really make a difference o
2930 - [x] SelectionSort
3031 - [x] InsertionSort
3132 - [x] Radix Sort
32−- [x] Implement Score system
33+- [ ] Score system
34+ - [x] Implement Score system
35+ - [ ] Make the score system somewhat useful
3336 - [ ] Code Refactoring/Cleaning
34−
35−
36−
M src/main.c View
@@ -94,8 +94,8 @@ void decrement_score(Difficulty diff) {
9494 printf("Wrong Answer!! The score will be decremented by 20\n");
9595 score -= MEDIUM_SCORE_DECREMENT;
9696 } 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);
9999 }
100100 }
101101