I have made a simple black jack card game which can have between 1 and 4 players. (not including the dealer).
Each member becomes an index in an array of structures. I have to determine whether 2 or more of the array members have the same value..
I know this seems logical at the moment. But the size of the array varies because there may be 1, 2, 3 or 4 players at once..
I considered using a loop to go through each player and find out what that precise players total was.
Just to explain why i cant just use an if statement:
Occasionally, this will not work because player 3 may not exist.
Im new to this type of programming so my terminology may be a bit off.
Regards,
Andrew Buntine.
Each member becomes an index in an array of structures. I have to determine whether 2 or more of the array members have the same value..
I know this seems logical at the moment. But the size of the array varies because there may be 1, 2, 3 or 4 players at once..
I considered using a loop to go through each player and find out what that precise players total was.
Just to explain why i cant just use an if statement:
Code:
if (pstPlayer[0].intTotal == pstPlayer[1].intTotal)
{
printf("Total scores are equal.");
}
Im new to this type of programming so my terminology may be a bit off.
Regards,
Andrew Buntine.