def deploy_ship(y, x, board, ship_length, orientation, ship_num):
    """
    This is a built-in method provided by AIGaming. Deploys a ship at the given coordinate on the board. Checks as to
    whether it can be placed are done against the board.
    :param y: an integer, making up the row index.
    :param x: an integer, making up the column index.
    :param board: a 2D array containing a string representation of the board.
    :param ship_length: length of the ship.
    :param orientation: the way the ship is oriented.
    :param ship_num: id or index of the ship.
    :return: True, if the placement was successful. False, if it was not.
    """
    if orientation == "V":  # If we are trying to place ship vertically
        if y + ship_length - 1 >= len(board):  # If ship doesn't fit within board boundaries
            return False  # Ship not deployed
        for l in range(ship_length):  # For every section of the ship
            if board[y + l][x] != "":  # If there is something on the board obstructing the ship
                return False  # Ship not deployed
        for l in range(ship_length):  # For every section of the ship
            board[y + l][x] = str(ship_num)  # Place the ship on the board
    else:  # If we are trying to place ship horizontally
        if x + ship_length - 1 >= len(board[0]):  # If ship doesn't fit within board boundaries
            return False  # Ship not deployed
        for l in range(ship_length):  # For every section of the ship
            if board[y][x + l] != "":  # If there is something on the board obstructing the ship
                return False  # Ship not deployed
        for l in range(ship_length):  # For every section of the ship
            board[y][x + l] = str(ship_num)  # Place the ship on the board
    return True