if(gameboard[randomx][randomy] == 0)
{
gameboard[randomx][randomy] = 1;
counter++;
}
That should be under your randomx and randomy math generators.
Type: Posts; User: camel-man
if(gameboard[randomx][randomy] == 0)
{
gameboard[randomx][randomy] = 1;
counter++;
}
That should be under your randomx and randomy math generators.
You could check to see if a 1 is in that "slot" and if there is already a 1 there, then you should redo the random number generator until it finds an open slot.