diff --git a/src/main/c/Stefan/blackjack.c b/src/main/c/Stefan/blackjack.c index 4935dc3..ff54699 100644 --- a/src/main/c/Stefan/blackjack.c +++ b/src/main/c/Stefan/blackjack.c @@ -68,19 +68,19 @@ int userInputBJ(){ int getRandCard(int offset){ srand(time(NULL) + offset); - int r = rand() % ANZ_MOEGLICHE_KARTEN; - r++; + int randomCard = rand() % ANZ_MOEGLICHE_KARTEN; + randomCard++; // 11, 12, 13 = Bube, Dame, König haben den Wert 10 - if(r > 10){ + if(randomCard > 10){ return 10; } // Ass (1) hat erstmal den Wert 11 - else if(r == 1){ + else if(randomCard == 1){ return 11; } - return r; + return randomCard; }