예제 #1
0
def close_airway(from_city_id, to_city_id: int, number_of_rounds=1) -> Action:
    from_city_name = get_city_name(from_city_id)
    to_city_name = get_city_name(to_city_id)
    return Action({
        "type": "closeConnection",
        "fromCity": from_city_name,
        "toCity": to_city_name,
        "rounds": number_of_rounds
    }, 3 + 3 * number_of_rounds)
예제 #2
0
def close_airport(city_id: int, number_of_rounds=1) -> Action:
    city_name = get_city_name(city_id)
    return Action({
        "type": "closeAirport",
        "city": city_name,
        "rounds": number_of_rounds
    }, 15 + 5 * number_of_rounds)
예제 #3
0
def quarantine_city(city_id: int, number_of_rounds=1) -> Action:
    city_name = get_city_name(city_id)
    return Action({
        "type": "putUnderQuarantine",
        "city": city_name,
        "rounds": number_of_rounds
    }, 20 + 10 * number_of_rounds)
예제 #4
0
def deploy_medication(pathogen_id: int, city_id: int) -> Action:
    pathogen_name = get_pathogen_name(pathogen_id)
    city_name = get_city_name(city_id)
    return Action({
        "type": "deployMedication",
        "pathogen": pathogen_name,
        "city": city_name
    }, 10)
예제 #5
0
def deploy_vaccine(pathogen_id: int, city_id: int) -> Action:
    pathogen_name = get_pathogen_name(pathogen_id)
    city_name = get_city_name(city_id)
    return Action({
        "type": "deployVaccine",
        "pathogen": pathogen_name,
        "city": city_name
    }, 5)
예제 #6
0
def launch_campaign(city_id: int) -> Action:
    city_name = get_city_name(city_id)
    return Action({
        "type": "launchCampaign",
        "city": city_name
    }, 3)
예제 #7
0
def apply_hygienic_measures(city_id: int) -> Action:
    city_name = get_city_name(city_id)
    return Action({
        "type": "applyHygienicMeasures",
        "city": city_name
    }, 3)
예제 #8
0
def call_for_elections(city_id: int) -> Action:
    city_name = get_city_name(city_id)
    return Action({
        "type": "callElections",
        "city": city_name
    }, 3)
예제 #9
0
def exert_political_influence(city_id: int) -> Action:
    city_name = get_city_name(city_id)
    return Action({
        "type": "exertInfluence",
        "city": city_name
    }, 3)