def check_ship(field, ship):
    """
    Check if ship has been sunk.

    ARGUMENTS:
    field - the field with ship to check
    ship - ship to check

    RETURNS:
    True/False boolean, True if ship has been sunk.
    """
    x = ship["coords"][0]
    y = ship["coords"][1]
    orientation = ship["orientation"]
    hit_list = []
    for i in range(ship["length"]):
        hit_list.append(field[x+i*orientation[0]][y+i*orientation[1]]["hit"])
    if sum(hit_list) == ship["length"]:
        return True
    else:
        return False