public class WorldData extends java.lang.Object implements JSON
Simulator.nextTurn(ArrayList) method.
It contains all world and region data to be returned to the client after each turn.
It does not contain high resolution location data possibly needed by the visualizer.JSON.Parser| Modifier and Type | Field and Description |
|---|---|
java.util.ArrayList<SpecialEventData> |
eventList
List of special world events (if any) that occurred during the past turn (3 years).
|
double[] |
foodPrice
Sell foodPrice in US Dollars for one metric ton (1000 kg) of each food category on
the world market at the start of the current year.
|
RegionData[] |
regionData
Data for each of the player and non-player world regions.
|
double |
seaLevel
Rise (+) or fall (-) in the average global sea level from Constant.FIRST_YEAR as measured
at the start of the current simulation year.;
|
int |
year
Year to which this WorldData applies.
|
| Constructor and Description |
|---|
WorldData() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
void |
fromJSON(java.lang.Object doc)
Convert String into JSON
|
JSONDocument |
toJSON()
Convert class into json
|
java.lang.String |
toString() |
public int year
public double seaLevel
public java.util.ArrayList<SpecialEventData> eventList
public RegionData[] regionData
public double[] foodPrice
public java.lang.String toString()
toString in class java.lang.Objectpublic JSONDocument toJSON()
JSONpublic void fromJSON(java.lang.Object doc)
JSONpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object