Racey – Crashing

STEP Seven

#collision for thing
        if thing_starty > display_height:
            thing_starty = 0 - thing_height
            thing_startx = random.randrange(0,display_width)
 
##########################################################
##                                                      ##
##      Replace this with Code from Step EIGHT-D        ##
##                                                      ##
##########################################################
 
        if y < thing_starty+thing_height:
            #print('y crossover')
 
            if x > thing_startx and x < thing_startx + thing_width or x+car_width > thing_startx and x + car_width < thing_startx+thing_width:
                #print('x crossover')
                crash()

Now run your code

You can now crash into the obstacles