From 5038d8194aed26fc86577f3422820c44e8a37a07 Mon Sep 17 00:00:00 2001 From: fdai7472 Date: Mon, 29 Jan 2024 16:36:59 +0100 Subject: [PATCH] refactoring: Funktion createSymbols zu randomizeSymbols umbenannt --- src/main/c/Stefan/slot_machine.c | 4 ++-- src/main/c/Stefan/slot_machine.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/c/Stefan/slot_machine.c b/src/main/c/Stefan/slot_machine.c index a554065..f57a38e 100644 --- a/src/main/c/Stefan/slot_machine.c +++ b/src/main/c/Stefan/slot_machine.c @@ -16,7 +16,7 @@ void slotMachine(){ int bet = getBet(balance); balance = subtractBetFromBalance(bet, balance); - createSymbols(symbols); + randomizeSymbols(symbols); } } @@ -53,7 +53,7 @@ int subtractBetFromBalance(int bet, int balance){ return balance - bet; } -void createSymbols(Symbol symbols[]){ +void randomizeSymbols(Symbol symbols[]){ char possibleLetter[] = "ABCD"; int possibleValue[] = { 3,5,10,20 }; diff --git a/src/main/c/Stefan/slot_machine.h b/src/main/c/Stefan/slot_machine.h index 5cf2295..bebd77b 100644 --- a/src/main/c/Stefan/slot_machine.h +++ b/src/main/c/Stefan/slot_machine.h @@ -14,6 +14,6 @@ int getBalance(); int userInput(); int getBet(int balance); int subtractBetFromBalance(int bet, int balance); -void createSymbols(Symbol symbols[]); +void randomizeSymbols(Symbol symbols[]); #endif // SLOT_MACHINE_H \ No newline at end of file