Skip to content
NRTopping edited this page Apr 2, 2014 · 3 revisions

Resources

Resource.java vs Resources.java

Resource.Java

Resource.java contains the Enum Resource. This enum outlines the various Resource types (None, Gold, Stone, Wood, and Food). This is used to populate Tile objects with a resource type. The type of resource on a given tile object will dictate what can be built there (i.e. Farms can only be built on Tile objects with a Resource type of Food, Stone mines on stone, etc.)

Resources.java

Resources.java contains the class Resources. This class is used to keep track of current player resources (Gold, Stone, Wood, Food, and Research Points). It is also used to conduct transactions (i.e. Buildings and Units will have a Resources Cost, represented by a Resources object).

Clone this wiki locally