I’m having a tough time trying to create a game that involves conditionals, loops and lists together. The instructions are relatively long and I don’t know if I’m allowed to post it here for a better explanation. In a nutshell, I need to make a game that starts with 3 blocks stacked (with random red, green or blue colors), and by pressing b it gives a new square (with one of random colors), and by pressing s, it moves the last drawn square to a new stack, and I can only move more squares if they’re the same color (moving 3 to same stack gives me 5 points). And by pressing d, it destroys the last square created (costing 1 point).
My main issue is how to get to drawn random squares stacked with only colors of pure red, blue and green, but no other colors.
The conditionals, and loops I know enough to get it on my own.
If anybody can help me out on this one I would really appreciate.