player.py
def draw_ship(self, position, direction, ship):
        """Create a new ship, draw it and append it to warships."""
        row, column = gf.convert_position(position)
        coordinates = []
        for length in range(ship[1]):
            if direction == 'h':
                coordinates.append((row, column + length))
            else:
                coordinates.append((row + length, column))
        new_ship = Ship(self.board_obj, coordinates, ship[0])
        new_ship.change_boxes_to_ship()
        self.warships.append(new_ship)
Create a new ship, draw it and append it to warships.
Create a new ship, draw it and append it to warships.
Create a new ship draw it and append it to warships .
def draw_ship(self, position, direction, ship):
        row, column = gf.convert_position(position)
        coordinates = []
        for length in range(ship[1]):
            if direction == 'h':
                coordinates.append((row, column + length))
            else:
                coordinates.append((row + length, column))
        new_ship = Ship(self.board_obj, coordinates, ship[0])
        new_ship.change_boxes_to_ship()
        self.warships.append(new_ship)
def draw_ship ( self , position , direction , ship ) : row , column = gf . convert_position ( position ) coordinates = [ ] for length in range ( ship [ 1 ] ) : if direction == 'h' : coordinates . append ( ( row , column + length ) ) else : coordinates . append ( ( row + length , column ) ) new_ship = Ship ( self . board_obj , coordinates , ship [ 0 ] ) new_ship . change_boxes_to_ship ( ) self . warships . append ( new_ship )
Create a new ship, draw it and append it to warships.
Create a new ship draw it and append it to warships .
"""Create a new ship, draw it and append it to warships."""
self
position
direction
ship