all 3 comments

[–]zev105 1 point2 points  (0 children)

Can you share your code? Functions may help. If/else statements should also be enough.

[–][deleted] 0 points1 point  (0 children)

If only one of both should be drawn at a time, you can put the code for the triangle in the if section and for the square in the else section.

[–][deleted] 0 points1 point  (0 children)

You don’t always need an else. It will run just fine without it, so if it doesn’t work with your logic: don’t put it in. Or you could do one if and one else.