simogl.resource
Class Gold

java.lang.Object
  extended by simogl.resource.AbstractResource
      extended by simogl.resource.Gold

public class Gold
extends AbstractResource

Represents the resource "gold"

Author:
Frank Bruns

Constructor Summary
Gold(int amount, long intervall)
          Creates a object of the resource gold with the specified initial amount
 
Method Summary
 void update(long elapsedTime)
          Recalculates the available amount of the resource
 
Methods inherited from class simogl.resource.AbstractResource
decrease, getCurrentAmount, getUpdateIntervall, increase, setCurrentAmount, setUpdateIntervall
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gold

public Gold(int amount,
            long intervall)
Creates a object of the resource gold with the specified initial amount

Parameters:
amount - initial amount of gold
intervall - intervall of time in miliseconds in which calculations on resources will be performed, effecting the amount of the player's resources
Method Detail

update

public void update(long elapsedTime)
Description copied from class: AbstractResource
Recalculates the available amount of the resource

Specified by:
update in class AbstractResource
Parameters:
elapsedTime - time between two calls of the updater thread