now we need to update the position of each alien as wellalien_ invasion py start the main loop for the game while truegf check_events(ai_settingsscreenshipbulletsship update(gf update_bullets(bulletsgf update_aliens(aliensgf update_screen(ai_settingsscreenshipaliensbulletswe update the alienspositions after the bullets have been updatedbecause we'll soon be checking to see whether any bullets hit any aliens finallyadd the new function update_aliens(at the end of the file game_functions pygame_ functions py def update_aliens(aliens)"""update the postions of all aliens in the fleet ""aliens update(we use the update(method on the aliens groupwhich automatically calls each alien' update(method when you run alien invasion nowyou should see the fleet move right and disappear off the side of the screen creating settings for fleet direction now we'll create the settings that will make the fleet move down the screen and to the left when it hits the right edge of the screen here' how to implement this behaviorsettings py alien settings self alien_speed_factor self fleet_drop_speed fleet_direction of represents right- represents left self fleet_direction the setting fleet_drop_speed controls how quickly the fleet drops down the screen each time an alien reaches either edge it' helpful to separate this speed from the alienshorizontal speed so you can adjust the two speeds independently to implement the setting fleet_directionwe could use text valuesuch as 'leftor 'right'but we' end up with ifelif statements testing for the fleet direction insteadbecause we have only two directions to deal withlet' use the values and - and switch between them each time the fleet changes direction (using numbers also makes sense because moving right involves adding to each alien' -coordinate valueand moving left involves subtracting from each alien' -coordinate value aliens