Optimization: Added getType instead of type

Otherwise type would keep be run a lot on the same terrain.  Changed
ecosystem class to use getType()