thereforecalling playerrect move_ip(- playermoverate will change the location of playerrect by pixels to the left of its current location if moveright and playerrect right windowwidthplayerrect move_ip(playermoverate if moveup and playerrect top playerrect move_ip( - playermoverateif movedown and playerrect bottom windowheightplayerrect move_ip( playermoveratelines to do the same thing for the other three directionsrightupand down each of the three if statements in lines to checks that their movement variable is set to true and that the edge of the rect object of the player is inside the window then it calls move_ip(to move the rect object the pygame mouse set_pos(function move the mouse cursor to match the player pygame mouse set_pos(playerrect centerxplayerrect centeryline moves the mouse cursor to the same position as the player' character the pygame mouse set_pos(function moves the mouse cursor to the xand -coordinates you pass it this is so that the mouse cursor and player' character are always in the same place specificallythe cursor will be right in the middle of the character' rect object because you passed the centerx and centery attributes of playerrect for the coordinates the mouse cursor still exists and can be movedeven though it is invisible because of the pygame mouse set_visible(falsecall on line move the baddies down for in baddiesnow loop through each baddie data structure in the baddies list to move them down little if not reversecheat and not slowcheatb['rect'move_ip( ['speed']if neither of the cheats have been activatedthen move the baddie' location down number of pixels equal to its speedwhich is stored in the 'speedkey implementing the cheat codes