This commit is contained in:
2017-08-23 21:15:18 +02:00
parent 6c168a8618
commit d9f9acc87c
5 changed files with 76 additions and 84 deletions

View File

@@ -1,18 +1,16 @@
#include <time.h>
/* Defined macros */
#define DEFAULTTRIES 6
#define DEFAULTTRIES 6
#define MAXWORDLENGTH 200
#define ALPHABET 26
#define ALPHABET_NUM 36
#define ANIM_DURATION 1
#define LINEBREAK 16 //Linebreak offset
#define HITFEEDSLOTS 5
#define IMPRESSIVESTREAK 3 //reach amount of hit streaks to activate impressive screen
#define IMPRESSIVEHIT 2
#define HITFEEDSLOTS 5
#define IMPRESSIVESTREAK 3 //reach amount of hit streaks to activate impressive screen
#define IMPRESSIVEHIT 2
/* Data structures */
typedef struct {
@@ -51,14 +49,14 @@ void quitProgram(void);
void updateScreen(game_state *gs);
void initCoordinates(game_state *gs);
void initGuessWord(game_state *gs, char *filename);
void initAlphabet(game_state *gs);
void initAlphabet(game_state *gs);
void drawAlphabet(game_state *gs, char usedchar);
void drawGuessWord(game_state *gs);
int playerInput(game_state *gs, hitfeed *hf);
int fillCurrentWord(game_state *gs, char validchar);
int stackWrongCharacter(game_state *gs, char wrongchar);
int checkWin(game_state *gs);
void printGameStats(game_state *gs);
void printGameStats(game_state *gs);
void toLowerCase(char *str);
void showStartScreen(game_state *gs);
void startGame(game_state *gs, hitfeed *hf);