|
@ -2,6 +2,7 @@ |
|
|
#include <stdio.h> |
|
|
#include <stdio.h> |
|
|
#include <stdlib.h> |
|
|
#include <stdlib.h> |
|
|
#include <time.h> |
|
|
#include <time.h> |
|
|
|
|
|
#include <string.h> |
|
|
|
|
|
|
|
|
char* getWelcomeMessageSSP(); |
|
|
char* getWelcomeMessageSSP(); |
|
|
int selectCOMChoice(); |
|
|
int selectCOMChoice(); |
|
@ -89,16 +90,34 @@ char* getWelcomeMessageSSP() |
|
|
"Gibst du bei der Aufforderung 0 ein, gelangst du zurueck ins Hauptmenue!\n\n"; |
|
|
"Gibst du bei der Aufforderung 0 ein, gelangst du zurueck ins Hauptmenue!\n\n"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void printResult(int winNumb, int comSelect) |
|
|
void printResult(int winNumb, int comSelect) |
|
|
{ |
|
|
{ |
|
|
|
|
|
char comWeapon[10]; |
|
|
|
|
|
switch(comSelect) |
|
|
|
|
|
{ |
|
|
|
|
|
case(1): |
|
|
|
|
|
strcpy(comWeapon, "Schere"); |
|
|
|
|
|
break; |
|
|
|
|
|
case(2): |
|
|
|
|
|
strcpy(comWeapon,"Stein"); |
|
|
|
|
|
break; |
|
|
|
|
|
case(3): |
|
|
|
|
|
strcpy(comWeapon,"Papier"); |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
strcpy(comWeapon, "Not found"); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
switch (winNumb) |
|
|
switch (winNumb) |
|
|
{ |
|
|
{ |
|
|
case(-1):printf("Der Computer hat %d gewaehlt, Du hast verloren!!!\n\n", comSelect); |
|
|
|
|
|
|
|
|
case(-1):printf("Der Computer hat %s gewaehlt, Du hast verloren!!!\n\n", comWeapon); |
|
|
break; |
|
|
break; |
|
|
case(0): printf("Der Computer hat %d gewaehlt, Es steht unentschieden!!!\n\n", comSelect); |
|
|
|
|
|
|
|
|
case(0): printf("Der Computer hat %s gewaehlt, Es steht unentschieden!!!\n\n", comWeapon); |
|
|
break; |
|
|
break; |
|
|
case(1): printf("Der Computer hat %d gewaehlt, Du hast gewonnen!!!\n\n", comSelect); |
|
|
|
|
|
|
|
|
case(1): printf("Der Computer hat %s gewaehlt, Du hast gewonnen!!!\n\n", comWeapon); |
|
|
break; |
|
|
break; |
|
|
default: printf("Error!"); |
|
|
default: printf("Error!"); |
|
|
|
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |