Browse Source

display rules before playing

remotes/origin/Saba
Saba Fazlali 11 months ago
parent
commit
ca77bb5af2
  1. BIN
      cmake-build-debug/.ninja_deps
  2. 8
      cmake-build-debug/.ninja_log
  3. 4
      cmake-build-debug/Testing/Temporary/LastTest.log
  4. 14
      src/main/c/Hangman/playHangman.c

BIN
cmake-build-debug/.ninja_deps

8
cmake-build-debug/.ninja_log

@ -38,3 +38,11 @@
1 192 1707251949669860983 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/initializeHangman.c.o 7d64de4520ec9e97
1 193 1707251949670799948 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
193 280 1707251949757039868 pmuw_projekt_notebinder a5668107eb06d295
0 52 1707252585783847591 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
52 79 1707252585809772184 pmuw_projekt_notebinder a5668107eb06d295
0 42 1707252794437411200 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
42 71 1707252794465899519 pmuw_projekt_notebinder a5668107eb06d295
0 38 1707252805989111884 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
38 64 1707252806014628850 pmuw_projekt_notebinder a5668107eb06d295
0 40 1707252878137714916 CMakeFiles/pmuw_projekt_notebinder.dir/src/main/c/Hangman/playHangman.c.o f2e2af7048638ee6
40 64 1707252878161423786 pmuw_projekt_notebinder a5668107eb06d295

4
cmake-build-debug/Testing/Temporary/LastTest.log

@ -1,3 +1,3 @@
Start testing: Feb 06 21:21 CET
Start testing: Feb 06 21:54 CET
----------------------------------------------------------
End testing: Feb 06 21:21 CET
End testing: Feb 06 21:54 CET

14
src/main/c/Hangman/playHangman.c

@ -44,7 +44,19 @@ void playHangman(char *wordToGuess) {
// Initialize the current guess and print the rules
initializeHangman(wordToGuess, currentGuess);
printRules();
int readRules;
printf("Do you know how to play? (type number 1 or 2): \n");
printf("1. YES \n");
printf("2. NO \n");
scanf("%d", &readRules);
if( readRules == 2){
printRules();
} else if (readRules == 1) {
printf("Let's get started!\n");
} else {
printf("Please enter either 1 or 2 to continue: \n");
}
while (mistakes < MAX_MISTAKES) {
currentState(currentGuess, mistakes);

Loading…
Cancel
Save