gamedom1.agent
Class SmartMove
java.lang.Object
gamedom1.agent.SmartMove
- All Implemented Interfaces:
- ClientCommandIF
public class SmartMove
- extends java.lang.Object
- implements ClientCommandIF
This class does SmartMove and SmartAttack. (move/attack + pathfinding + replanning when needed.)
A bit of patchwork, as smart attacking was an afterthought.
smartAttack.isActive is true when (smart)attacking, false when (smart)moving.
This class could be on the infiniteWisdom package as well as a utility class, as it's quite handy and reusable.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmartMove
public SmartMove(UnitIF rec,
Vec2f g)
throws GridPathFinder.PathNotExistsException
- Throws:
GridPathFinder.PathNotExistsException
SmartMove
public SmartMove(UnitIF rec,
UnitIF enemy,
double dist)
throws GridPathFinder.PathNotExistsException
- Throws:
GridPathFinder.PathNotExistsException
step
public ServerCommand step()
- Specified by:
step
in interface ClientCommandIF
getReceiver
public UnitIF getReceiver()
- Specified by:
getReceiver
in interface ClientCommandIF
getGoal
public Vec2f getGoal()
getSMOverlayDrawer
public SmartMove.SmartMOverlayDrawer getSMOverlayDrawer(GameWorldView gwv)