Class Continent

java.lang.Object
org.bitsquad.warzone.continent.Continent

public class Continent extends Object
Represents a Continent Object This class defines a continent with its ID, its constituent Countries and its bonus value.
  • Constructor Details

    • Continent

      public Continent()
      Default Constructor
    • Continent

      public Continent(int p_continentId, int p_bonusValue)
      Parameterized Constructor
      Parameters:
      p_continentId - continent ID
      p_bonusValue - continents' bonus value
    • Continent

      public Continent(int p_continentId, String p_continentName, int p_bonusValue)
  • Method Details

    • getId

      public int getId()
      Getter method of continentId.
      Returns:
      the id of the continent
    • setId

      public void setId(int p_continentId)
      Setter method of continentId.
      Parameters:
      p_continentId - the continent id
    • setName

      public void setName(String p_continentName)
    • getName

      public String getName()
    • getValue

      public int getValue()
      getter method of the bonus value of continent
      Returns:
      d_bonusValue the bonus value of continent
    • setValue

      public void setValue(int p_bonusValue)
      Setter method of bonus value
      Parameters:
      p_bonusValue - the bonus value of the continent
    • getCountries

      public HashMap<Integer,Country> getCountries()
      Getter method for Countries hashmap
      Returns:
      the hashmap of countries
    • setCountries

      public void setCountries(HashMap<Integer,Country> p_countries)
      Setter method of countries hashmap.
      Parameters:
      p_countries - the hashmap of countries
    • addCountry

      public void addCountry(int p_countryId, String p_countryName)
      Method to add a Country
      Parameters:
      p_countryId - the country id
      p_countryName - the name of the country
    • removeCountry

      public void removeCountry(int p_countryId)
      Method to remove a country using country Id
      Parameters:
      p_countryId - the country id