+ small changes in header files
@ -19,4 +19,6 @@ add_executable(pmuw_projekt_notebinder
src/main/c/Hangman/rules.h
src/main/c/Hangman/initializeHangman.c
src/main/c/Hangman/initializeHangman.h
src/main/c/Hangman/currentState.c
src/main/c/Hangman/currentState.h
)
@ -0,0 +1,6 @@
#include "currentState.h"
void currentState(char *currentGuess, int mistakes) {
printf("Current Word: %s \n", currentGuess);
printf("Mistakes Made: %d/6 \n", mistakes);
}
@ -0,0 +1,4 @@
#ifndef PMUW_PROJEKT_NOTEBINDER_CURRENTSTATE_H
#define PMUW_PROJEKT_NOTEBINDER_CURRENTSTATE_H
#include <stdio.h>
#endif //PMUW_PROJEKT_NOTEBINDER_CURRENTSTATE_H
@ -1,4 +1,4 @@
#include "drawHangman.h"
void drawHangman(int incorrectGuesses) {
@ -1,8 +1,6 @@
//
// Created by Saba Fazlali on 29.01.24.
#ifndef PMUW_PROJEKT_NOTEBINDER_DRAWHANGMAN_H
#define PMUW_PROJEKT_NOTEBINDER_DRAWHANGMAN_H
#endif //PMUW_PROJEKT_NOTEBINDER_DRAWHANGMAN_H
@ -1,7 +1,4 @@
#include <string.h>
#include <ctype.h>
#include "initializeHangman.h"
void initializeHangman(char *wordToGuess, char *currentGuess) {
int wordLength = strlen(wordToGuess);
// Created by Saba Fazlali on 31.01.24.
#ifndef PMUW_PROJEKT_NOTEBINDER_INITIALIZEHANGMAN_H
#define PMUW_PROJEKT_NOTEBINDER_INITIALIZEHANGMAN_H
#endif //PMUW_PROJEKT_NOTEBINDER_INITIALIZEHANGMAN_H
@ -1,5 +1,4 @@
#include "rules.h"
void printRules(){
printf("Rules: \n");
@ -1,8 +1,4 @@
#ifndef PMUW_PROJEKT_NOTEBINDER_RULES_H
#define PMUW_PROJEKT_NOTEBINDER_RULES_H
#endif //PMUW_PROJEKT_NOTEBINDER_RULES_H
@ -1,7 +1,3 @@
// Created by Saba Fazlali on 22.01.24.
#include "word_selector.h"
const char wordsList[NUM_WORDS][MAX_WORD_LENGTH + 1] = {
// Created by Saba Fazlali on 24.01.24.
#ifndef PMUW_PROJEKT_NOTEBINDER_WORD_SELECTOR_H
#define PMUW_PROJEKT_NOTEBINDER_WORD_SELECTOR_H