Random positioning and conditions
Hi! I’ve created this logic accoridng to which, there’s a varibale called “assigend” set to false from the start. So I’ve creted a condition according to which if assigend is set to false, then assign a random x and y to 5 images (according to a 8×8 grid, with 64 squares). At the end of the assign series, “assigned” is set up to true. The problem is that I don’t want the images to overlap, so I’ve created multiple conditions that verify if an image is in the same x and y of another (eg. image1.x = image2.x && image1.y = image2.y), so every conditions verify if a ship is in the same position of another, with two statements per each conditions (one for x and one for y). Each time this condition is verified, the assigned variable turns to false and the cycle should start again. In my head this should work, but in reality sometimes two images would overlap anyway.
I know there’s no OR possibility in protopie, but a solution would be great.
Can someone help?