stats reset_stats(stats game_active true reset the scoreboard images sb prep_score(sb prep_high_score(sb prep_level(empty the list of aliens and bullets aliens empty(bullets empty(--snip-the definition of check_play_button(needs the sb object to reset the scoreboard imageswe call prep_score()prep_high_score()and prep_level(after resetting the relevant game settings now pass sb from check_events(so check_play_button(has access to the scoreboard objectgame_ functions py def check_events(ai_settingsscreenstatssbplay_buttonshipaliensbullets)"""respond to keypresses and mouse events ""for event in pygame event get()if event type =pygame quit--snip-elif event type =pygame mousebuttondownmouse_xmouse_y pygame mouse get_pos( check_play_button(ai_settingsscreenstatssbplay_buttonshipaliensbulletsmouse_xmouse_ythe definition of check_events(needs sb as parameterso the call to check_play_button(can include sb as an argument finallyupdate the call to check_events(in alien_invasion py so it passes sb as wellalien_ invasion py start the main loop for the game while truegf check_events(ai_settingsscreenstatssbplay_buttonshipaliensbullets--snip-now you can see how many levels you've completedas shown in figure -