starting the game to start new game when the player clicks playadd the following code to game_functions py to monitor mouse events over the buttongame_ functions py def check_events(ai_settingsscreenstatsplay_buttonshipbullets)"""respond to keypresses and mouse events ""for event in pygame event get()if event type =pygame quit--snip- elif event type =pygame mousebuttondownv mouse_xmouse_y pygame mouse get_pos( check_play_button(statsplay_buttonmouse_xmouse_ydef check_play_button(statsplay_buttonmouse_xmouse_y)"""start new game when the player clicks play "" if play_button rect collidepoint(mouse_xmouse_y)stats game_active true we've updated the definition of check_events(to accept the stats and play_button parameters we'll use stats to access the game_active flag and play_button to check whether the play button has been clicked pygame detects mousebuttondown event when the player clicks anywhere on the screen ubut we want to restrict our game to respond to mouse clicks only on the play button to accomplish thiswe use pygame mouse get_pos()which returns tuple containing the xand -coordinates of the mouse cursor when the mouse button is clicked we send these values to the function check_play_button(wwhich uses collidepoint(to see if the point of the mouse click overlaps the region defined by the play button' rect if sowe set game_active to trueand the game beginsscoring