cz.cuni.amis.pogamut.defcon.communication.messages.infos
Class City
java.lang.Object
cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConObject
cz.cuni.amis.pogamut.defcon.communication.messages.infos.DefConViewableObject
cz.cuni.amis.pogamut.defcon.communication.messages.infos.City
- All Implemented Interfaces:
- IWorldObject, ILocated, IViewable, ICompositeWorldObject
public class City
- extends DefConViewableObject
A city from the world.
Constructor Summary |
City(City original)
Cloning constructor... |
City(int id,
int teamId,
DefConLocation location,
boolean visible,
int population,
double time)
Creates new instance of object City with specific id. |
City
public City(int id,
int teamId,
DefConLocation location,
boolean visible,
int population,
double time)
- Creates new instance of object City with specific id.
A city from the world.
- Parameters:
id
- Game id of this object.teamId
- Id of this object's team.location
- Location of this object.visible
- Visibility of this object.population
- Number of surviving inhabitants in millions.time
- Time of last update of this object (time of first spotting in this case).
City
public City(City original)
- Cloning constructor...
- Parameters:
original
-
getPopulation
public int getPopulation()
- Number of surviving inhabitants in millions.
- Returns:
- int
toString
public String toString()
- Returns human readable serialization of the message.
- Overrides:
toString
in class Object
- Returns:
- human readable string
toHtmlString
public String toHtmlString()
- Returns message in html format.
- Returns:
- html message
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.