factory pattern at the momentthis code does nothing but wait for the player to click the close button on the window and then terminate execution to make this more interactivelet' add small square and have it move when the user presses one of the arrow keys for thiswe will need to draw the square on the screen in its initial positionready to react to arrow key events shape_game py (see ch pyimport pygame window_dimensions screen pygame display set_mode(window_dimensionsx player_quits false while not player_quitsfor event in pygame event get()if event type =pygame quitplayer_quits true pressed pygame key get_pressed(if pressed[pygame k_up] - if pressed[pygame k_down] + if pressed[pygame k_left] - if pressed[pygame k_right] + screen fill(( )pygame draw rect(screen( )pygame rect(xy )pygame display flip(play around with the code for bit to see if you can get the block to not move out of the boundaries of the window now that your block can move around the screenhow about doing all of this for circleand then for triangle and now for game character icon you get the picturesuddenlythere is lot of display code clogging up the game loop what if we cleaned this up bit using an object-oriented approach to the situation