gizmoball.gameworld
Class Counter

java.lang.Object
  extended by gizmoball.gameworld.Counter

public class Counter
extends java.lang.Object

A class that represents an integer counter, that can be increased and decreased.

Specification Fields :
count : integer // the value of the counter

Constructor Summary
Counter()
           
Counter(int initialCount)
           
 
Method Summary
 void addCount(int add)
           
 int getCount()
           
 void setCount(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Counter

public Counter()
Effects:
creates a Counter with this.count = 0

Counter

public Counter(int initialCount)
Effects:
creates a Counter with this.count = initialCount
Method Detail

getCount

public int getCount()
Returns:
this.count

addCount

public void addCount(int add)
Effects:
this.count_post = this.count_pre + add

setCount

public void setCount(int value)
Effects:
this.count = value