Browse Source

refactoring: bessere Willkommensnachricht

remotes/origin/stefan
fdai7472 11 months ago
parent
commit
3f003c2f9b
  1. 16
      src/main/c/Stefan/blackjack.c
  2. 1
      src/main/c/Stefan/blackjack.h

16
src/main/c/Stefan/blackjack.c

@ -6,8 +6,7 @@
int blackjack(){
printf("Welcome to Blackjack \n\n");
welcomeMessageBJ();
bool exit = false;
bool *exitPtr = &exit;
@ -227,4 +226,17 @@ int calculateWinnings(bool blackjack, int bet){
}
printf("Du hast %d gewonnen!\n", bet);
return 2 * bet;
}
void welcomeMessageBJ(){
printf("Willkommen zu..\n\n"
" _ _ _ _ _ \n"
"| | | | | | (_) | | \n"
"| |__ | | __ _ ___| | ___ __ _ ___| | __\n"
"| '_ \\| |/ _` |/ __| |/ / |/ _` |/ __| |/ /\n"
"| |_) | | (_| | (__| <| | (_| | (__| < \n"
"|_.__/|_|\\__,_|\\___|_|\\_\\ |\\__,_|\\___|_|\\_\\\n"
" _/ | \n"
" |__/ \n\n");
}

1
src/main/c/Stefan/blackjack.h

@ -4,6 +4,7 @@
#include <stdbool.h>
int blackjack();
void welcomeMessageBJ();
int getBalanceBJ();
int getBetBJ(int balance, bool *exitPtr);
int userInputBJ();

Loading…
Cancel
Save