diff --git a/src/main/c/Tim/hangman.c b/src/main/c/Tim/hangman.c index 96ecc80..427f788 100644 --- a/src/main/c/Tim/hangman.c +++ b/src/main/c/Tim/hangman.c @@ -6,11 +6,7 @@ #include #include -#define LISTSIZE 30 -#define MAX_WORD_LENGTH 30 -#define STAGENUM 7 -#define ASCII_ART_SIZE 1000 -#define POSSIBLE_TRYS 6 + char wordlist[LISTSIZE][MAX_WORD_LENGTH] = { diff --git a/src/main/c/Tim/hangman.h b/src/main/c/Tim/hangman.h index 45feb3e..732f005 100644 --- a/src/main/c/Tim/hangman.h +++ b/src/main/c/Tim/hangman.h @@ -2,6 +2,11 @@ #ifndef HANGMAN_H #define HANGMAN_H +#define LISTSIZE 30 +#define MAX_WORD_LENGTH 30 +#define STAGENUM 7 +#define ASCII_ART_SIZE 1000 +#define POSSIBLE_TRYS 6 void hangman(); char* getWordFromList(int); diff --git a/src/test/c/Tim/test_hangman.c b/src/test/c/Tim/test_hangman.c index 4e6d98e..0ddb407 100644 --- a/src/test/c/Tim/test_hangman.c +++ b/src/test/c/Tim/test_hangman.c @@ -43,7 +43,7 @@ void test_getWordFromList_Kleiderschrank_5() void test_getWordFromList_IndexOutOfList() { //arrange - int pos = 60; + int pos = LISTSIZE+1; char expectedResult[] = "Index nicht vorhanden"; //act char actualResult[30];