cz.cuni.pogamut.Client
Class TestBot2

java.lang.Object
  extended by cz.cuni.pogamut.Client.Agent
      extended by cz.cuni.pogamut.Client.TestBot2
All Implemented Interfaces:
RcvMsgListener, Introspectable, java.lang.Runnable, java.util.EventListener

public class TestBot2
extends Agent

NOTE: Class with agent must be marked also in manifest.mf, otherwise IDE don't know, which file it should run.


Field Summary
(package private)  AutoTraceRay autorayStraight
           
(package private)  double distStraight
           
private  java.lang.String[] navPoints
           
static int RAY_LEFT
           
static int RAY_RIGHT
           
static int RAY_STRAIGHT
           
static int RAY_STRAIGHT_UP45
           
private  NavPoint runTo
           
private  boolean runToNext
           
static double SENSOR_LENGTH
           
(package private)  AutoTraceRay traceLeft
           
(package private)  AutoTraceRay traceRight
           
(package private)  AutoTraceRay traceStraight
           
(package private)  AutoTraceRay traceStraightUp45
           
 
Fields inherited from class cz.cuni.pogamut.Client.Agent
bindedParserType, body, flagLogicTemporalyStopped, gameBotConnection, gameMap, GARBAGE_COLLECTOR_FREQUENCY, instancesAlive, iterationEndListeners, log, logicFrequency, logicFrequencyChanged, memory, oldLogicFrequency, parserLogger, pauseHolders, platformLog, random, rawGBLog
 
Constructor Summary
TestBot2()
          Creates a new instance of agent.
 
Method Summary
protected  void doLogic()
          There you are supposed to connect any external tool for decision making or you can write there some script, that will control the agent.
static void main(java.lang.String[] args)
           
protected  void postPrepareAgent()
          prepare logic according to information from gathered from startCommunication like choosing plan/parameters according to game type note that you still can't send any messages to gamebots (like CONF etc.)
protected  void shutdownAgent()
          clean - up after the end of simulation of agent
 
Methods inherited from class cz.cuni.pogamut.Client.Agent
addIterationEndListener, bindLocalParser, bindRemoteParser, clearListeners, disconnect, finalize, getBindedParserType, getBody, getCommunicationState, getFlagLogicTemporalyStopped, getIntrospectableProxy, getLogger, getLogicThread, getMap, getMediator, getMemory, getMilisecToSleep, getName, getPlatformLog, getRawDataLog, initBody, initGameMap, initLogging, initMemory, isRunning, logicReady, pauseLogic, prePrepareAgent, receiveMessage, removeIterationEndListener, resumeLogic, run, sendMessageToGB, setFlagLogicTemporalyStopped, setLogicStartLatch, startAgent, startAgent, stopAgentSoft
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runTo

private NavPoint runTo

navPoints

private java.lang.String[] navPoints

runToNext

private boolean runToNext

SENSOR_LENGTH

public static final double SENSOR_LENGTH
See Also:
Constant Field Values

RAY_STRAIGHT

public static final int RAY_STRAIGHT
See Also:
Constant Field Values

RAY_LEFT

public static final int RAY_LEFT
See Also:
Constant Field Values

RAY_RIGHT

public static final int RAY_RIGHT
See Also:
Constant Field Values

RAY_STRAIGHT_UP45

public static final int RAY_STRAIGHT_UP45
See Also:
Constant Field Values

traceStraight

AutoTraceRay traceStraight

traceLeft

AutoTraceRay traceLeft

traceRight

AutoTraceRay traceRight

traceStraightUp45

AutoTraceRay traceStraightUp45

autorayStraight

AutoTraceRay autorayStraight

distStraight

double distStraight
Constructor Detail

TestBot2

public TestBot2()
Creates a new instance of agent.

Method Detail

doLogic

protected void doLogic()
Description copied from class: Agent
There you are supposed to connect any external tool for decision making or you can write there some script, that will control the agent.

Note: it's not good practice to have infinite loop in doLogic() because stopAgentSoft() won't work. But it's OK if you rewrite the stopAgentSoft()

Overrides:
doLogic in class Agent

postPrepareAgent

protected void postPrepareAgent()
                         throws PogamutException
Description copied from class: Agent
prepare logic according to information from gathered from startCommunication like choosing plan/parameters according to game type note that you still can't send any messages to gamebots (like CONF etc.)

Overrides:
postPrepareAgent in class Agent
Throws:
PogamutException

shutdownAgent

protected void shutdownAgent()
                      throws PogamutException
Description copied from class: Agent
clean - up after the end of simulation of agent

Overrides:
shutdownAgent in class Agent
Throws:
PogamutException

main

public static void main(java.lang.String[] args)
                 throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException