Closed CalebJohn closed 7 years ago
Is this so we can loop over the elements of resourceNames
instead of specifying them one-by-one in the function getResources
and the like?
Okay so for the implementation I'm going to store anything indexed by resource types into arrays which follow the order set out in the global variable resourceNames
This is especially referencing
getResources
andgetGatherers
of BaseObject.js.The alternative should be storing resources names in one globally accessible location, we can also add some type of enum to make accessing this list more friendly.
e.g.