setting up the block data structures set up the block data structure {'rect':pygame rect( )'color':red'dir':uprightset up dictionary as data structure that represents each block / introduced dictionaries the dictionary will have the keys of 'rect(with rect object for value)'color(with tuple of three integers for value)and 'dir(with one of the direction constant variables for valuethe variable will store one of these block data structures this block has its top left corner located at an -coordinate of and -coordinate of it has width of pixels and height of pixels its color is red and its direction is set to upright {'rect':pygame rect( )'color':green'dir':upleft {'rect':pygame rect( )'color':blue'dir':downleftline and creates two more similar data structures for blocks that are different sizespositionscolorsand directions blocks [ line put all of these data structures in listand store the list in variable named blocks the blocks variable stores list blocks[ would be the dictionary data structure in blocks[ ]['color'would be the 'colorkey in so the expression blocks[ ]['color'would evaluate to ( this way you can refer to any of the values in any of the block data structures by starting with blocks running the game loop run the game loop while true check for the quit event for event in pygame event get() if event type =quit pygame quit( sys exit(