I'm trying to make a classic snake game. Upon being eaten by the snake, the apple is supposed to be regenerated at a random location. However, I don't want it to overlaps snake head / snake body / other sprites on being created. What condition should I include to make this happen?
For a "GenerateApple" function, I plan to first randomly create a new apple
Then, I will sub-event the 'Or' overlapping condition (for the various objects) under a 'While' condition to keep destroy -> regenerate an apple WHILE unintended overlapping happens
Will this work?
Thanks a lot.