void reshuffle(int player[], int computer[], int playerToss[], int computerToss[])
{
bool playerDeckEmpty = true;
for(int x = 0; x < DECK_SIZE; x++)//checks to see if there player needs to be reshuffled
{
if(player[x] != 0)
{
playerDeckEmpty = false;
break;
}
}
int playerCardHolder = 0;
if (playerDeckEmpty == true)//reshuffles player
{
int v = 0;
for(int v = 0; v < DECK_SIZE; v++);
{
playerCardHolder = playerToss[v];
player[v] = playerCardHolder;
playerToss[v] = 0;
}
}
}
The program checks if the array player is empty, and if it is, it should copy what is in playerToss into player. For some reason if i display the array, they all equal zero.