make some variables static
This commit is contained in:
parent
5103602021
commit
66e624a44d
17
src/main.c
17
src/main.c
|
|
@ -5,10 +5,10 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
// https://texteditor.com/multiline-text-art/
|
// https://texteditor.com/multiline-text-art/
|
||||||
|
|
||||||
const int EASY_SCORE_DECREMENT = 10;
|
static const int EASY_SCORE_DECREMENT = 10;
|
||||||
const int MEDIUM_SCORE_DECREMENT = 20;
|
static const int MEDIUM_SCORE_DECREMENT = 20;
|
||||||
const int LOWER = 1;
|
static const int LOWER = 1;
|
||||||
const int UPPER = 4;
|
static const int UPPER = 4;
|
||||||
|
|
||||||
typedef enum Difficulty {
|
typedef enum Difficulty {
|
||||||
Easy,
|
Easy,
|
||||||
|
|
@ -18,9 +18,9 @@ typedef enum Difficulty {
|
||||||
|
|
||||||
int list[35];
|
int list[35];
|
||||||
|
|
||||||
int score = 100;
|
static int score = 0;
|
||||||
int level = 1;
|
static int level = 1;
|
||||||
int size = 5;
|
static int size = 5;
|
||||||
|
|
||||||
// Declaring Functions
|
// Declaring Functions
|
||||||
void decrement_score(Difficulty diff);
|
void decrement_score(Difficulty diff);
|
||||||
|
|
@ -120,6 +120,9 @@ Difficulty get_difficulty() {
|
||||||
case 3:
|
case 3:
|
||||||
difficulty = Hard;
|
difficulty = Hard;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
printf(COLOR_RED "Invalid Choice. Defaulting to Medium\n" COLOR_OFF);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return difficulty;
|
return difficulty;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in New Issue