Hello, I'm a beginner and new here. Started making simple game like wreck-a-mole game.
There are 9 constant-positioned holes. So, I thought that was easy to use "Choose" method by choosing both X and Y for appearing moles. Like this
But that's not easy at all. With this method, it will make some moles overlapped/collided with already-spawn mole.
Luckily, when I hit the mole, it shows that I hit only 1 mole. (I don't know why, but yeah...)
Later, I decided to make game instantly over when the playfield is full of moles. (Every hole has a mole in it).
I use molecount variable and set it when molecount is greater or equal to 9, set the timer to 0.
And problem occurred again. The game was over before the playfield is full of moles.
I slightly know why but still don't know how to fix it. Maybe I was wrong at the beginning that used "choose" method, was I?
If so, what method should I use instead? The method that random the constant position (like choose) to spawn moles in different holes (a.k.a. any hole except the hole with mole) to not be overlapped or collided at any time, so I can make it instantly game-over when the playfield is full of moles as I wish.
I appreciate every help, thanks! :)