Random Squares
Hi guys,
I'm trying to work out how to code something and am wondering if any of you can help.
The little game will basically have 8 squares, 6 of the squares are white and 2 are red, they appear on the screen for a couple of seconds and then turn white, you basically have to remember where they are.
I know how to do some of the programming, but i'm not sure how to random the position of the 2 red squares.
Can anyone shed any light on this for me?
Many thanks in advance for your help.
Chris
I'm trying to work out how to code something and am wondering if any of you can help.
The little game will basically have 8 squares, 6 of the squares are white and 2 are red, they appear on the screen for a couple of seconds and then turn white, you basically have to remember where they are.
I know how to do some of the programming, but i'm not sure how to random the position of the 2 red squares.
Can anyone shed any light on this for me?
Many thanks in advance for your help.
Chris
Comments
now a rule that only spawns red if the red count is equal or below 2
for the rest you have to tinker around a bit.
Thank you for the advise above, much appreciated.
Cheers,
Chris