com.brackeen.javagamebook.ai.pattern
Class DodgePatternZigZag

java.lang.Object
  extended bycom.brackeen.javagamebook.ai.pattern.AIPattern
      extended bycom.brackeen.javagamebook.ai.pattern.DodgePatternZigZag
All Implemented Interfaces:
PathFinder

public class DodgePatternZigZag
extends AIPattern

An "dodge" pattern that makes the bot zig perpindicular to the player, the zag back to the starting location.


Constructor Summary
DodgePatternZigZag(BSPTree tree)
           
DodgePatternZigZag(BSPTree tree, float dodgeDist)
           
 
Method Summary
 java.util.Iterator find(GameObject bot, GameObject player)
          Finds a path from GameObject A to GameObject B.
 
Methods inherited from class com.brackeen.javagamebook.ai.pattern.AIPattern
find, setBSPTree, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DodgePatternZigZag

public DodgePatternZigZag(BSPTree tree)

DodgePatternZigZag

public DodgePatternZigZag(BSPTree tree,
                          float dodgeDist)
Method Detail

find

public 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
Specified by:
find in class AIPattern