|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode._RobotBase
robocode._Robot
robocode.Robot
robocode._AdvancedRobot
robocode._AdvancedRadiansRobot
robocode.AdvancedRobot
rc.yoda.Yoda
public class Yoda
Yoda is an AdvancedRobot that provides basic robot operations. Yoda has quick scan radar with a one hundred percent lock on the enemy and provides accurate energy tracking to provide an extra event method for additional high-level robot behaviours
Field Summary |
---|
Fields inherited from class robocode._RobotBase |
---|
out |
Constructor Summary | |
---|---|
Yoda()
|
Method Summary | |
---|---|
void |
onBulletHit(robocode.BulletHitEvent e)
Event method called by Robocode when a bullet this robot fired hits another robot |
void |
onBulletHitBullet(robocode.BulletHitBulletEvent e)
Event method called by Robocode when a bullet this robot fired collides with a bullet fired by another robot |
void |
onBulletMissed(robocode.BulletMissedEvent e)
Event method called by Robocode when a bullet this robot fired hit a wall |
void |
onDeath(robocode.DeathEvent e)
Event method called by Robocode when this robot dies |
void |
onHitByBullet(robocode.HitByBulletEvent e)
Event method called by Robocode when this robot gets hit by a bullet |
void |
onHitRobot(robocode.HitRobotEvent e)
Event method called by Robocode when this robot collides with another robot |
void |
onHitWall(robocode.HitWallEvent e)
Event method called by Robocode when this robot hits a wall |
void |
onPaint(java.awt.Graphics2D g)
Event method called by Robocode when this robot is allowed to draw debugging graphics to the screen |
void |
onRobotDeath(robocode.RobotDeathEvent e)
Event method called by Robocode when a robot dies |
void |
onScannedRobot(robocode.ScannedRobotEvent e)
Event method called by Robocode when this robot's scanner passes over another robot |
void |
onWin(robocode.WinEvent e)
Event method called by Robocode when this robot wins a round |
void |
run()
Yoda's default behavior, all actions in while loop execute every round |
void |
setFire(double power)
fires a bullet with the specified power and keeps track of lossed energy due to firing |
Methods inherited from class robocode.AdvancedRobot |
---|
addCustomEvent, clearAllEvents, execute, getAdvancedEventListener, getAllEvents, getBulletHitBulletEvents, getBulletHitEvents, getBulletMissedEvents, getDataDirectory, getDataFile, getDataQuotaAvailable, getDistanceRemaining, getEventPriority, getGunHeadingRadians, getGunTurnRemaining, getGunTurnRemainingRadians, getHeadingRadians, getHitByBulletEvents, getHitRobotEvents, getHitWallEvents, getRadarHeadingRadians, getRadarTurnRemaining, getRadarTurnRemainingRadians, getRobotDeathEvents, getScannedRobotEvents, getStatusEvents, getTurnRemaining, getTurnRemainingRadians, isAdjustGunForRobotTurn, isAdjustRadarForGunTurn, isAdjustRadarForRobotTurn, onCustomEvent, onSkippedTurn, removeCustomEvent, setAhead, setBack, setEventPriority, setFireBullet, setInterruptible, setMaxTurnRate, setMaxVelocity, setResume, setStop, setStop, setTurnGunLeft, setTurnGunLeftRadians, setTurnGunRight, setTurnGunRightRadians, setTurnLeft, setTurnLeftRadians, setTurnRadarLeft, setTurnRadarLeftRadians, setTurnRadarRight, setTurnRadarRightRadians, setTurnRight, setTurnRightRadians, turnGunLeftRadians, turnGunRightRadians, turnLeftRadians, turnRadarLeftRadians, turnRadarRightRadians, turnRightRadians, waitFor |
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, fire, fireBullet, getBasicEventListener, getBattleFieldHeight, getBattleFieldWidth, getEnergy, getGraphics, getGunCoolingRate, getGunHeading, getGunHeat, getHeading, getHeight, getInteractiveEventListener, getName, getNumRounds, getOthers, getPaintEventListener, getRadarHeading, getRobotRunnable, getRoundNum, getTime, getVelocity, getWidth, getX, getY, onBattleEnded, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved, onRoundEnded, onStatus, resume, scan, setAdjustGunForRobotTurn, setAdjustRadarForGunTurn, setAdjustRadarForRobotTurn, setAllColors, setBodyColor, setBulletColor, setColors, setColors, setDebugProperty, setGunColor, setRadarColor, setScanColor, stop, stop, turnGunLeft, turnGunRight, turnLeft, turnRadarLeft, turnRadarRight, turnRight |
Methods inherited from class robocode._Robot |
---|
getBattleNum, getGunCharge, getGunImageName, getLife, getNumBattles, getRadarImageName, getRobotImageName, setGunImageName, setRadarImageName, setRobotImageName |
Methods inherited from class robocode._RobotBase |
---|
setOut, setPeer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface robocode.robotinterfaces.IBasicRobot |
---|
getBasicEventListener, getRobotRunnable, setOut, setPeer |
Constructor Detail |
---|
public Yoda()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class robocode.Robot
public void onScannedRobot(robocode.ScannedRobotEvent e)
onScannedRobot
in interface robocode.robotinterfaces.IBasicEvents
onScannedRobot
in class robocode.Robot
ScannedRobotEvent
- information about the scanned robotpublic void onHitByBullet(robocode.HitByBulletEvent e)
onHitByBullet
in interface robocode.robotinterfaces.IBasicEvents
onHitByBullet
in class robocode.Robot
HitByBulletEvent
- information about ther bullet
that hit this robotpublic void onBulletHit(robocode.BulletHitEvent e)
onBulletHit
in interface robocode.robotinterfaces.IBasicEvents
onBulletHit
in class robocode.Robot
BulletHitEvent
- information about the robot
that got hit by the bulletpublic void onBulletMissed(robocode.BulletMissedEvent e)
onBulletMissed
in interface robocode.robotinterfaces.IBasicEvents
onBulletMissed
in class robocode.Robot
BulletMissedEvent
- information about the bulletpublic void onBulletHitBullet(robocode.BulletHitBulletEvent e)
onBulletHitBullet
in interface robocode.robotinterfaces.IBasicEvents
onBulletHitBullet
in class robocode.Robot
BulletHitBulletEvent
- information about the bulletspublic void onHitWall(robocode.HitWallEvent e)
onHitWall
in interface robocode.robotinterfaces.IBasicEvents
onHitWall
in class robocode.Robot
HitWallEvent
- information about the wallpublic void onHitRobot(robocode.HitRobotEvent e)
onHitRobot
in interface robocode.robotinterfaces.IBasicEvents
onHitRobot
in class robocode.Robot
HitRobotEvent
- information about the collision and
the other robot in the crashpublic void onRobotDeath(robocode.RobotDeathEvent e)
onRobotDeath
in interface robocode.robotinterfaces.IBasicEvents
onRobotDeath
in class robocode.Robot
RobotDeathEvent
- name of decaesed robotpublic void onWin(robocode.WinEvent e)
onWin
in interface robocode.robotinterfaces.IBasicEvents
onWin
in class robocode.Robot
WinEvent
- public void onDeath(robocode.DeathEvent e)
onDeath
in interface robocode.robotinterfaces.IBasicEvents
onDeath
in class robocode.AdvancedRobot
DeathEvent
- public void onPaint(java.awt.Graphics2D g)
onPaint
in interface robocode.robotinterfaces.IPaintEvents
onPaint
in class robocode.Robot
Graphics2D
- graphics that provides drawing method for paintingpublic void setFire(double power)
setFire
in class robocode.AdvancedRobot
double
- power of the bullet to fire
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |