Browse Source

Guthaben wird nach jeder Runde angezeigt

remotes/origin/dev
fdai7472 11 months ago
parent
commit
a0f27247c4
  1. 6
      src/main/c/Stefan/slot_machine.c

6
src/main/c/Stefan/slot_machine.c

@ -15,8 +15,6 @@ void slotMachine(){
int bet = getBet(balance); int bet = getBet(balance);
balance = subtractBetFromBalance(bet, balance); balance = subtractBetFromBalance(bet, balance);
printf("Guthaben: %d\n", balance);
randomizeSymbols(symbols); randomizeSymbols(symbols);
spin(symbols, bet, balance); spin(symbols, bet, balance);
@ -89,8 +87,10 @@ void randomizeSymbols(char symbols[]){
int spin(char symbols[], int bet, int balance){ int spin(char symbols[], int bet, int balance){
showResult(symbols); showResult(symbols);
int winnings = getWinnings(symbols, bet);
int winnings = getWinnings(symbols, bet);
balance += winnings;
printf("Aktuelles Guthaben: %d\n-------------------------\n", balance);
return balance; return balance;
} }

Loading…
Cancel
Save