bots
Class TemplateBot

java.lang.Object
  extended byrobocode._Robot
      extended byrobocode.Robot
          extended byrobocode._AdvancedRobot
              extended byrobocode._AdvancedRadiansRobot
                  extended byrobocode.AdvancedRobot
                      extended byrobocode.TeamRobot
                          extended bybots.TemplateBot
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
MuteBot, TalkativeBot

public abstract class TemplateBot
extends robocode.TeamRobot

Template for mute and talkative robots

Author:
Francesco Baldisserri

Field Summary
 
Fields inherited from class robocode.Robot
out
 
Constructor Summary
TemplateBot()
           
 
Method Summary
 BotInfoMap getBots()
           
 double getMaxDistance()
           
 int[] getState()
           
 java.lang.String getTarget()
           
 void onBulletHit(robocode.BulletHitEvent arg0)
           
 void onBulletHitBullet(robocode.BulletHitBulletEvent arg0)
           
 void onBulletMissed(robocode.BulletMissedEvent arg0)
           
 void onCustomEvent(robocode.CustomEvent arg0)
           
 void onDeath(robocode.DeathEvent arg0)
           
 void onHitByBullet(robocode.HitByBulletEvent arg0)
           
 void onHitRobot(robocode.HitRobotEvent arg0)
           
 void onHitWall(robocode.HitWallEvent arg0)
           
 void onMessageReceived(robocode.MessageEvent arg0)
           
 void onRobotDeath(robocode.RobotDeathEvent arg0)
           
 void onScannedRobot(robocode.ScannedRobotEvent arg0)
           
 void onSkippedTurn(robocode.SkippedTurnEvent arg0)
           
 void onWin(robocode.WinEvent arg0)
           
 void run()
           
 void setState(int[] state, java.lang.String target)
          Set state and target of the robot, possible states are inside TemplateStateManager
 
Methods inherited from class robocode.TeamRobot
broadcastMessage, getTeammates, isTeammate, sendMessage
 
Methods inherited from class robocode.AdvancedRobot
addCustomEvent, clearAllEvents, execute, getAllEvents, getBulletHitBulletEvents, getBulletHitEvents, getBulletMissedEvents, getDataDirectory, getDataFile, getDataQuotaAvailable, getDistanceRemaining, getEventPriority, getGunTurnRemaining, getHitByBulletEvents, getHitRobotEvents, getHitWallEvents, getRadarTurnRemaining, getRobotDeathEvents, getScannedRobotEvents, getTurnRemaining, isAdjustGunForRobotTurn, isAdjustRadarForGunTurn, isAdjustRadarForRobotTurn, removeCustomEvent, setAhead, setBack, setEventPriority, setFire, setFireBullet, setInterruptible, setMaxTurnRate, setMaxVelocity, setResume, setStop, setStop, setTurnGunLeft, setTurnGunRight, setTurnLeft, setTurnRadarLeft, setTurnRadarRight, setTurnRight, waitFor
 
Methods inherited from class robocode._AdvancedRadiansRobot
getGunHeadingRadians, getGunTurnRemainingRadians, getHeadingRadians, getRadarHeadingRadians, getRadarTurnRemainingRadians, getTurnRemainingRadians, setTurnGunLeftRadians, setTurnGunRightRadians, setTurnLeftRadians, setTurnRadarLeftRadians, setTurnRadarRightRadians, setTurnRightRadians, turnGunLeftRadians, turnGunRightRadians, turnLeftRadians, turnRadarLeftRadians, turnRadarRightRadians, turnRightRadians
 
Methods inherited from class robocode._AdvancedRobot
endTurn, getGunHeadingDegrees, getHeadingDegrees, getMaxWaitCount, getRadarHeadingDegrees, getWaitCount, setTurnGunLeftDegrees, setTurnGunRightDegrees, setTurnLeftDegrees, setTurnRadarLeftDegrees, setTurnRadarRightDegrees, setTurnRightDegrees, turnGunLeftDegrees, turnGunRightDegrees, turnLeftDegrees, turnRadarLeftDegrees, turnRadarRightDegrees, turnRightDegrees
 
Methods inherited from class robocode.Robot
ahead, back, doNothing, finalize, fire, fireBullet, getBattleFieldHeight, getBattleFieldWidth, getEnergy, getGunCoolingRate, getGunHeading, getGunHeat, getHeading, getHeight, getName, getNumRounds, getOthers, getRadarHeading, getRoundNum, getTime, getVelocity, getWidth, getX, getY, resume, scan, setAdjustGunForRobotTurn, setAdjustRadarForGunTurn, setAdjustRadarForRobotTurn, setColors, stop, stop, turnGunLeft, turnGunRight, turnLeft, turnRadarLeft, turnRadarRight, turnRight
 
Methods inherited from class robocode._Robot
getBattleNum, getGunCharge, getGunImageName, getLife, getNumBattles, getRadarImageName, getRobotImageName, setGunImageName, setPeer, setRadarImageName, setRobotImageName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateBot

public TemplateBot()
Method Detail

run

public void run()

getMaxDistance

public double getMaxDistance()
Returns:
Returns the maxDistance.

onScannedRobot

public void onScannedRobot(robocode.ScannedRobotEvent arg0)

setState

public void setState(int[] state,
                     java.lang.String target)
Set state and target of the robot, possible states are inside TemplateStateManager

Parameters:
state - State to be set
target - Target to be set (null if there's not)

onMessageReceived

public void onMessageReceived(robocode.MessageEvent arg0)

onCustomEvent

public void onCustomEvent(robocode.CustomEvent arg0)

onDeath

public void onDeath(robocode.DeathEvent arg0)

onSkippedTurn

public void onSkippedTurn(robocode.SkippedTurnEvent arg0)

onBulletHit

public void onBulletHit(robocode.BulletHitEvent arg0)

onBulletHitBullet

public void onBulletHitBullet(robocode.BulletHitBulletEvent arg0)

onBulletMissed

public void onBulletMissed(robocode.BulletMissedEvent arg0)

onHitByBullet

public void onHitByBullet(robocode.HitByBulletEvent arg0)

onHitRobot

public void onHitRobot(robocode.HitRobotEvent arg0)

onHitWall

public void onHitWall(robocode.HitWallEvent arg0)

onRobotDeath

public void onRobotDeath(robocode.RobotDeathEvent arg0)

onWin

public void onWin(robocode.WinEvent arg0)

getBots

public BotInfoMap getBots()
Returns:
Returns the bots.

getState

public int[] getState()
Returns:
Returns the state.

getTarget

public java.lang.String getTarget()
Returns:
Returns the target.