ship.py
def update(self):
        """
        adjust the ship position based on the motion flag
        """
        if self.moving_right and (self.rect.right < self.screen_rect.right):
            self.x += self.settings.ship_speed
        if self.moving_left and (self.rect.left > 0 ): # self.screen_rect.left = 0
            self.x -= self.settings.ship_speed

        # update rect based on self.x
        self.rect.x = self.x

        adjust the ship position based on the motion flag
        
adjust the ship position based on the motion flag
adjust the ship position based on the motion flag
def update(self):
        if self.moving_right and (self.rect.right < self.screen_rect.right):
            self.x += self.settings.ship_speed
        if self.moving_left and (self.rect.left > 0 ): 
            self.x -= self.settings.ship_speed
        self.rect.x = self.x
def update ( self ) : if self . moving_right and ( self . rect . right < self . screen_rect . right ) : self . x += self . settings . ship_speed if self . moving_left and ( self . rect . left > 0 ) : self . x -= self . settings . ship_speed self . rect . x = self . x
adjust the ship position based on the motion flag
adjust the ship position based on the motion flag
"""
        adjust the ship position based on the motion flag
        """ # self.screen_rect.left = 0 # update rect based on self.x
self