|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|