def calculate_cost_construction_repair(structure, location):
    """
    Calculates the construction costs and repair costs of building a structure. It is assumed that the construction
    costs money to start with and it costs aditional money to make the structure higher. The repair cost is assumed
    to be the costs to replace the parts of the structure that were destroyed (breached).

    :param structure: The structure that we want to know the costs of
    :param location: the location where the structure is built

    :return [construction_cost, repair cost]: the total construction and repair cost of the structure
    """

    if location.Type == 'Water':
        height = 0
    else:
        height = location.Height
            
    construction_cost = (structure.CostConstant+structure.CostVariable*(structure.Height-height))*location.Width / 1000
    repair_cost = structure.ReplacementFactor * construction_cost * structure.BreachFactor
    
    return [construction_cost, repair_cost]