reset_stats(instead of directly in __init__(we'll call this method from __init__(so the statistics are set properly when the gamestats instance is first created ubut we'll also be able to call reset_stats(any time the player starts new game right now we have only one statisticships_leftthe value of which will change throughout the game the number of ships the player starts with is stored in settings py as ship_limitsettings py ship settings self ship_speed_factor self ship_limit we also need to make few changes in alien_invasion pyto create an instance of gamestatsalien_ invasion py --snip-from settings import settings from game_stats import gamestats --snip-def run_game()--snip-pygame display set_caption("alien invasion" create an instance to store game statistics stats gamestats(ai_settings--snip-start the main loop for the game while true--snip-gf update_bullets(ai_settingsscreenshipaliensbulletsgf update_aliens(ai_settingsstatsscreenshipaliensbullets--snip-we import the new gamestats class umake stats instance vand then add the statsscreenand ship arguments in the call to update_aliens( we'll use these arguments to track the number of ships the player has left and to build new fleet when an alien hits the ship when an alien hits the shipwe subtract one from the number of ships leftdestroy all existing aliens and bulletscreate new fleetand reposition the ship in the middle of the screen (we'll also pause the game for moment so the player can notice the collision and regroup before new fleet appears let' put most of this code in the function ship_hit()game_ import sys functions py from time import sleep import pygame --snip-