Class ActionPrinter


  • public class ActionPrinter
    extends Object
    Helper for the Implementation to return the actions as JSON String.
    • Constructor Detail

      • ActionPrinter

        public ActionPrinter()
    • Method Detail

      • endRound

        public static String endRound()
        Format the action endRound as JSON action object.
        Returns:
        The endRound as JSON action object.
      • putUnderQuarantine

        public static String putUnderQuarantine​(City city,
                                                int rounds)
        Format the action putUnderQuarantine as JSON action object.
        Parameters:
        city - A city that should be in quarantine
        rounds - the amount of rounds, that the city should be in quarantine.
        Returns:
        The putUnderQuarantine as JSON action object.
      • closeAirport

        public static String closeAirport​(City city,
                                          int rounds)
        Format the action closeAirport as JSON action object.
        Parameters:
        city - A city that should be in quarantine
        rounds - the amount of rounds for the closed airport of the city.
        Returns:
        The closeAirport as JSON action object.
      • closeConnection

        public static String closeConnection​(City fromCity,
                                             City toCity,
                                             int rounds)
        Format the action closeConnection as JSON action object.
        Parameters:
        fromCity - The "start" city for the connection.
        toCity - The targeted city for the connection.
        rounds - the amount of rounds for the closed connection.
        Returns:
        The closeConnection as JSON action object.
      • developVaccine

        public static String developVaccine​(Pathogen pathogen)
        Format the action developVaccine as JSON action object.
        Parameters:
        pathogen - The target pathogen for the vaccine.
        Returns:
        The developVaccine as JSON action object.
      • deployVaccine

        public static String deployVaccine​(Pathogen pathogen,
                                           City city)
        Format the action deployVaccine as JSON action object.
        Parameters:
        pathogen - The pathogen, where the vaccine is available.
        city - The city, where the vaccine should be applied.
        Returns:
        The deployVaccine as JSON action object.
      • developMedication

        public static String developMedication​(Pathogen pathogen)
        Format the action developMedication as JSON action object.
        Parameters:
        pathogen - The target pathogen for the medication.
        Returns:
        The developMedication as JSON action object.
      • deployMedication

        public static String deployMedication​(Pathogen pathogen,
                                              City city)
        Format the action deployMedication as JSON action object.
        Parameters:
        pathogen - The pathogen, where the medication is available.
        city - The city, where the medication should be applied.
        Returns:
        The deployMedication as JSON action object.
      • exertInfluence

        public static String exertInfluence​(City city)
        Format the action exertInfluence as JSON action object.
        Parameters:
        city - The city, where the "exertInfluence" should be applied.
        Returns:
        The exertInfluence as JSON action object.
      • callElections

        public static String callElections​(City city)
        Format the action callElections as JSON action object.
        Parameters:
        city - The city, where the "callElections" should be applied.
        Returns:
        The callElections as JSON action object.
      • applyHygienicMeasures

        public static String applyHygienicMeasures​(City city)
        Format the action applyHygienicMeasures as JSON action object.
        Parameters:
        city - The city, where the "applyHygienicMeasures" should be applied.
        Returns:
        The applyHygienicMeasures as JSON action object.
      • launchCampaign

        public static String launchCampaign​(City city)
        Format the action launchCampaign as JSON action object.
        Parameters:
        city - The city, where the "launchCampaign" should be applied.
        Returns:
        The launchCampaign as JSON action object.