the pygame transform flip(function load the image files l_squir_img pygame image load('squirrel png'r_squir_img pygame transform flip(l_squir_imgtruefalsegrassimages [for in range( )grassimages append(pygame image load('grass% pngi)the image for the player and enemy squirrels is loaded from squirrel png on line make sure that this png file is in the same folder as squirrel pyotherwise you will get the error pygame errorcouldn' open squirrel png the image in squirrel png (which you can download from squirrel facing to the left we also need surface object that contains picture of the squirrel facing to the right instead of creating second png image filewe can call the pygame transform flip(function this function has three parametersthe surface object with the image to flipa boolean value to do horizontal flipand boolean value to do vertical flip by passing true for the second parameter and false for the third parameterthe surface object that returns has the image of the squirrel facing to the right the original surface object in l_squir_img that we passed in is unchanged here are examples of images being horizontally and vertically flippedoriginal horizontal flip vertical flip horizontal and vertical flip while truerungame(after the setup in main(is completethe game begins with rungame(being called more detailed game state than usual def rungame() set up variables for the start of new game email questions to the authoral@inventwithpython com