diff --git a/src/main/c/Stefan/blackjack.c b/src/main/c/Stefan/blackjack.c index bb649ec..9c40be9 100644 --- a/src/main/c/Stefan/blackjack.c +++ b/src/main/c/Stefan/blackjack.c @@ -6,13 +6,12 @@ int blackjack(){ - printf("Welcome to Blackjack \n"); + printf("Welcome to Blackjack \n\n"); int balance = getBalanceBJ(); - while(balance > 0){ - printf("Guthaben: %d\n", balance); + printf("Aktuelles Guthaben: %d\n", balance); int bet = getBetBJ(balance); balance -= bet; @@ -23,9 +22,8 @@ int blackjack(){ } int getBalanceBJ(){ - int balance = 0; printf("Guthaben einwerfen: "); - scanf("%d", &balance); + int balance = userInputBJ(); printf("Dein Guthaben: %d\n", balance); return balance; }