vooga.games.jumper.rules
Class Gravity

java.lang.Object
  extended by vooga.games.jumper.rules.Gravity
All Implemented Interfaces:
Rule

public class Gravity
extends java.lang.Object
implements Rule

Apply gravity to the doodle


Constructor Summary
Gravity()
           
 
Method Summary
 void enforce(SpriteGroup... groups)
          set type SpriteGroup to be enforced by this rule.
 boolean isSatisfied(SpriteGroup... groups)
          Check to see if the rule is satisfied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gravity

public Gravity()
Method Detail

enforce

public void enforce(SpriteGroup... groups)
set type SpriteGroup to be enforced by this rule.

Specified by:
enforce in interface Rule
Parameters:
any - number of type SpriteGroup

isSatisfied

public boolean isSatisfied(SpriteGroup... groups)
Check to see if the rule is satisfied.

Specified by:
isSatisfied in interface Rule
Parameters:
any - number of type SpriteGroup
Returns:
always returns true because gravity is consistently present