Random word from file #5
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/* Defined macros */
|
||||
#define DEFAULTTRIES 9
|
||||
#define MAXWORDLENGTH 100
|
||||
|
||||
/* Data structures */
|
||||
typedef struct {
|
||||
@@ -10,9 +11,9 @@ typedef struct {
|
||||
int maxx;
|
||||
int centery;
|
||||
int centerx;
|
||||
char guessWord[100];
|
||||
char guessWord[MAXWORDLENGTH];
|
||||
int wordLength;
|
||||
char currentWord[100];
|
||||
char currentWord[MAXWORDLENGTH];
|
||||
char wrongCharacters[DEFAULTTRIES];
|
||||
} game_state;
|
||||
|
||||
@@ -38,3 +39,4 @@ void showStartScreen(game_state *gs);
|
||||
void startGame(game_state *gs);
|
||||
void showHelp(game_state *gs);
|
||||
int centerDiff(int coordinate, char *str);
|
||||
void readRandomLine(char *file, char *result);
|
||||
|
Reference in New Issue
Block a user