com.brackeen.javagamebook.ai.pattern
Class AIPattern

java.lang.Object
  extended bycom.brackeen.javagamebook.ai.pattern.AIPattern
All Implemented Interfaces:
PathFinder
Direct Known Subclasses:
AimPattern, AttackPatternRush, AttackPatternStrafe, DodgePatternRandom, DodgePatternZigZag, RunAwayPattern

public abstract class AIPattern
extends java.lang.Object
implements PathFinder

Simple abstract PathFinder that implements the find(Vector3D, Vector3D) method to return null. Unimplemented ideas: AttackPatternSneak and DodgePatternHide


Constructor Summary
AIPattern(BSPTree bspTree)
          The BSP tree is used to get correct y values for the world.
 
Method Summary
abstract  java.util.Iterator find(GameObject bot, GameObject player)
          Finds a path from GameObject A to GameObject B.
 java.util.Iterator find(Vector3D start, Vector3D goal)
          The method isn't implemented for AIPatterns
 void setBSPTree(BSPTree bspTree)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AIPattern

public AIPattern(BSPTree bspTree)
The BSP tree is used to get correct y values for the world.

Method Detail

setBSPTree

public void setBSPTree(BSPTree bspTree)

find

public java.util.Iterator find(Vector3D start,
                               Vector3D goal)
The method isn't implemented for AIPatterns

Specified by:
find in interface PathFinder

find

public abstract java.util.Iterator find(GameObject bot,
                                        GameObject player)
Description copied from interface: PathFinder
Finds a path from GameObject A to GameObject B. The path is an Iterator of Vector3Ds, not including the start location (GameObject A) but including the goal location (GameObject B). The Vector3D objects may be used in other objects and should not be modified. Returns null if no path found.

Specified by:
find in interface PathFinder

toString

public java.lang.String toString()