I Haz Codes

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Menu
Stacking triangles

http://www.pygame.org/docs/ref/draw.html#pygame.draw.lines

using the link above, create a pygame program which will generate the triangle below using random colours. It should use a while loop and NOT just be a series of draw commands. The secret is to decide on how each triangle differs. Start off with drawing the larger triangle first and then the second one. See how they change and then incorporate that into a loop.

 

triangle


You need to log in or create an account to submit code!

Leave a Reply

Your email address will not be published. Required fields are marked *

Information