wyvern.lib.predicates
Class BlockingPredicate

java.lang.Object
  extended bywyvern.lib.predicates.BlockingPredicate
All Implemented Interfaces:
Predicate

public class BlockingPredicate
extends java.lang.Object
implements Predicate

This predicate checks for things like walls, living things, buildings, etc. Anything that impedes motion or would prevent another blocking object from being placed there.

Version:
1.0, Sep 27, 1997
Author:
Steve Yegge

Constructor Summary
BlockingPredicate()
          Constructs a new BlockingPredicate with no exclusions.
BlockingPredicate(GameObject obj)
          Constructs a new BlockingPredicate
 
Method Summary
 boolean predicate(GameObject o)
          Checks an object to see if it passes the predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockingPredicate

public BlockingPredicate()
Constructs a new BlockingPredicate with no exclusions.


BlockingPredicate

public BlockingPredicate(GameObject obj)
Constructs a new BlockingPredicate

Parameters:
obj - an object to exclude from the search, even if it's blocking.
Method Detail

predicate

public boolean predicate(GameObject o)
Description copied from interface: Predicate
Checks an object to see if it passes the predicate.

Specified by:
predicate in interface Predicate
Parameters:
o - any GameObject
Returns:
true if the object passes, else false