Beruflich Dokumente
Kultur Dokumente
Method Summary
Resumen de mtodos
This method is called when one of your bullets hits another robot.
// Este mtodo se llama cuando uno de tus balas golpea a otro robot.
void onBulletHitBullet (BulletHitBulletEvent event)
This method is called when one of your bullets hits another bullet. // Este mtodo se llama cuando uno de tus balas golpea otra bala.
void onBulletMissed (BulletMissedEvent event)
This method is called when one of your bullets misses, i.e. hits a wall. // Este mtodo se llama cuando una de sus balas se pierde, es decir, golpea
una pared.
void onDeath(DeathEvent event)
This method is called when your robot is hit by a bullet. // Este mtodo se llama cuando el robot es alcanzado por una bala.
void onHitRobot (HitRobotEvent event)
This method is called when your robot collides with another robot.
// Este mtodo es llamado cuando el robot choca con otro robot
void onHitWall (HitWallEvent event)
This method is called when your robot collides with a wall. // Este mtodo es llamado cuando el robot choca con una pared
void onRobotDeath (RobotDeathEv ent event)
This method is called when your robot sees another robot, i.e. when the robot's radar scan "hits" another robot. // Este mtodo se llama cuando el robot ve a otro robot, es decir, cuando el
radar del robot de exploracin "xitos" a otro robot.
void onStatus(StatusEvent event)
This method is called every turn in a battle round in order to provide the robot status as a complete snapshot of the robot's current state at that specific time.
// Este mtodo se llama cada vez en una ronda de batalla a fin de proporcionar el estado del robot como una imagen completa del estado actual del robot, en ese momento.
void onWin(WinEvent event)
Class StatusEvent
public final class StatusEvent extends Event
Este evento se enva al onStatus () cada vez, en una batalla para proporcionar el estado del robot Vea tambin: Serializado Formulario
Constructor Summary
( Constructor Resumen )
This constructor is called internally from the game in order to create a new RobotStatus .
// Este constructor es llamado internamente por el juego con el fin de crear una
nueva RobotStatus.
Returns the RobotStatus at the time defined by Robot.getTime() . // Devuelve el RobotStatus en el tiempo definido por Robot.getTime (). Methods inherited from class robocode.Event
( Mtodos heredados de la clase robocode.Event )
Parameters:
status - the current states
Returns:
la RobotStatus en el tiempo definido por Robot.getTime (). Vea tambin:
Event.getTime()
Example:
public void onBulletHit(BulletHitEvent event) { out.println("I hit " + event.getName() + "!"); }
Parmetros: event - el evento de bala golpe establecido por el juego Vea tambin: BulletHitEvent, event
//--------------------------------------------------------------------------------------------------------------------------BulletHitEvent, event
Called by the game to create a new BulletHitEvent . // Lo llama el juego para crear una nueva BulletHitEvent.
Method Summary
Bullet getBullet ()
( Metodos resumen )
Returns the bullet of yours that hit the robot. // Devuelve la bala de los suyos que azot el robot.
double getEnergy ()
Returns the remaining energy of the robot your bullet has hit (after the damage done by your bullet). // Devuelve la energa restante del robot ha llegado a su bala (despus de los daos causados por la bala).
double getLife()
Returns the name of the robot your bullet hit. // Devuelve el nombre del robot de su bala (pego)
double getRobotLife ()
getBullet
public Bullet getBullet ()
Returns:
la bala que golpe el robot
getEnergy
public double getEnergy ()
Devuelve la energa restante del robot ha llegado a su bala (despus de los daos causados por la bala).
Returns:
la energa de la energa restante del robot que la bala ha afectado
getName
public String getName()
Returns:
el nombre del robot de la bala
//------------------------------------------- -------------------------------------------------------------------------------//---------------------------------------------------------------------------------------------------------------------------
onBulletHitBullet
void onBulletHitBullet (BulletHitBulletEvent event)
Este mtodo se llama cuando uno de tus balas golpea otra bala. Usted debe reemplazar en el robot si quieres estar informado d e este evento
Example:
public void onBulletHitBullet(BulletHitBulletEvent event) { out.println("I hit a bullet fired by " + event.getBullet().getName() + "!"); }
Parameters: - the bullet-hit-bullet event set by the game //el evento de bala-golpear-bala establecido por el juego Vase tambin; BulletHitBulletEvent , Event
event
Este evento se enva al onBulletHitBullet cuando una de sus balas ha afectado a otra bala
Called by the game to create a new BulletHitEvent . // Lo llama el juego para crear una nueva BulletHitEvent
Method Summary
Bullet getBullet ()
( Metodo Resumen )
Returns your bullet that hit another bullet. // Devuelve la bala que afect a otra bala
Bullet getHitBullet ()
Returns the bullet that was hit by your bullet. // Devuelve la bala que fue alcanzado por la bala.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Parameters:
bullet - la bala que afect a otra bala hitBullet - la bala que fue alcanzado por la bala
Returns:
su bala
getHitBullet
public Bullet getHitBullet ()
Returns:
la bala que fue golpeado
//--------------------------------------------------------------------------------------------------------------------------//---------------------------------------------------------------------------------------------------------------------------
onBulletMissed
void onBulletMissed (BulletMissedEvent event)
This method is called when one of your bullets misses, i.e. hits a wall. You should override it in your robot if you want to be informed of this event.
//Este mtodo se llama cuando una de sus balas se pierde, es decir, gol pea una pared. Usted debe reemplazar en el robot si quieres estar informado de este evento.
Example:
public void onBulletMissed(BulletMissedEvent event) { out.println("Drat, I missed."); }
Parameters:
event - the bullet-missed event set by the game
//--------------------------------------------------------------------------------------------------------------------------BulletMissedEvent
Called by the game to create a new BulletMissedEvent . // Lo llama el juego para crear una nueva BulletMissedEvent.
Returns the bullet that missed. // Devuelve la bala que se perdi. Methods inherited from class robocode.Event
( Mtodos heredados de la clase robocode.Event )
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Parameters:
bullet - la bala que se perdi
Returns:
la bala que se perdi
//---------------------------------------------------------------------------------------------------------------------------
onDeath
void onDeath(DeathEvent event)
Parameters:
event - el caso de la muerte establecido por el juego
Vease tambien:
DeathEvent , WinEvent , RoundEndedEvent , BattleEndedEvent , Event
//--------------------------------------------------------------------------------- -----------------------------------------//---------------------------------------------------------------------------------------------------------------------------
onHitByBullet
void onHitByBullet (HitByBulletEvent event)
Este mtodo se llama cuando el robot es alcanzado por una bala. Usted debe reemplazar en el robot si quieres estar informado de este evento. Example:
void onHitByBullet( HitByBulletEvent event) { out.println(event.getRobotName() + " hit me!"); }
Parameters:
event - the hit-by-bullet event set by the game
//--------------------------------------------------------------------------------------------------------------------------HitByBulletEvent
Class HitByBulletEvent
Un HitByBulletEvent se enva a onHitByBullet () cuando el robot ha sido alcanzado por una bala. Puede utilizar la informacin contenida en este evento para determinar qu hacer.
Called by the game to create a new HitByBulletEvent. // Lo llama el juego para crear una nueva HitByBulletEvent
Method Summary
double getBearing ()
( Metoso Resumen )
Returns the bearing to the bullet, relative to your robot's heading, in degrees (-180 < getBearing() <= 180). //Devuelve el rumbo en relac in con la bala, en relacin con el robot de la partida, en grados ( -180 <getBearing () <= 180).
double getBearingRadians ()
Returns the bearing to the bullet, relative to your robot's heading, in radians (-Math.PI < getBearingRadians() <= Math.PI). // Devuelve el rumbo en relacin con la bala, en relacin con el robot de la partida, en radianes ( -Math.PI <getBearingRadians () <= Math.PI).
Bullet getBullet ()
Returns the bullet that hit your robot. // Devuelve la bala que afect a su robot
double getHeading ()
Returns the heading of the bullet when it hit you, in degrees (0 <= getHeading() < 360). // Devuelve el ttulo de la bala cuando te diste cuenta, en grados (0 <= getHeading () <360).
double getHeadingDegrees ()
Returns the heading of the bullet when it hit you, in radians (0 <= getHeadingRadians() < 2 * PI). // Devuelve el ttulo de l a bala cuando te diste cuenta, en radianes (0 <= getHeadingRadians () <2 * PI).
String getName()
Returns the name of the robot that fired the bullet. // Devuelve el nombre del robot que dispar la bala.
double getPower()
Returns the velocity of this bullet. // Devuelve la velocidad de la bala Methods inherited from class robocode.Event
compareTo , getPriority , getTime, setPriority , setTime
Constructor Detail
HitByBulletEvent
( Constructor Detalle )
Parameters:
bearing - the bearing of the bullet that hit your robot, in radians
Method Detail
getBearing
( Metodo Detalle )
Devuelve el rumbo en relacin con la bala, en relacin con el robot de la partida, en grados (-180 <getBearing () <= 180 ).
Si usted fuera a turnRight (event.getBearing ()), que se enfrenta la direccin de la bala vino. El clculo se utiliza aqu es: (bala rumbo en grados + 180) - (su rumbo en grados)
getBearingRadians
public double getBearingRadians ()
Devuelve el rumbo en relacin con la bala, en relacin con el robot de la partida, en radianes (-Math.PI <getBearingRadians () <= Math.PI).
Si usted fuera a turnRightRadians (event.getBearingRadians ()), que se enfrenta la direccin de la bala vino. El clculo se utiliza aqu es: (bala partida en radianes + Math.PI) - (su direccin en radianes)
Returns:
el bearing de la bala, en radianes
getBullet
public Bullet getBullet ()
Returns:
la bala que afect a su robo t
getHeading
public double getHeading ()
Returns the heading of the bullet when it hit you, in degrees (0 <= getHeading() < 360).
// Devuelve el heading de la bala cuando te diste cuenta, en grados (0 <= getHeading () <360).
Nota: Esto no es relativa a la direccin en la que se enfrentan. El robot que dispar la bala fue en la direccin opuesta de getHeading () cuando se dispar la bala.
getHeadingRadians
public double getHeadingRadians ()
Devuelve el heading de la bala cuando te diste cuenta, en radianes (0 <= getHeadingRadians () <2 * PI).
Nota: Esto no es relativa a la direccin en la que se enfrentan. El robot que dispar la bal a fue en la direccin opuesta de getHeadingRadians () cuando se dispar la bala
Returns:
El heading de la bala, en radianes
getName
public String getName()
Returns:
el nombre del robot que dispar la bala
getPower
public double getPower()
Returns the power of this bullet. The damage you take (in fact, already took) is 4 * power, plus 2 * (power-1) if power > 1. The robot that fired the bullet receives 3 * power back. // Devuelve el poder de la bala. El dao que recibes (de hecho, y a se) es de 4 * power,plus 2 * (power -1) if power> 1. El robot que dispar la bala recibe energa de 3 *power back. (alimentacion) Returns:
el poder de la bala
getVelocity
public double getVelocity ()
Returns:
la velocidad de la bala
//--------------------------------------------------------------------------------------------------------------------------//------------------------------------------------------------------------------------------- --------------------------------
onHitRobot
void onHitRobot (HitRobotEvent event)
This method is called when your robot collides with another robot. You should override it in your robot if you want to be informed of this event.
Example:
void onHitRobot(HitRobotEvent event) { if (event.getBearing() > -90 && event.getBearing() <= 90) { back(100); } else { ahead(100); } } -- or perhaps, for a more advanced robot - - -// o tal vez, para un robot ms avanzado - - public void onHitRobot(HitRobotEvent event) { if (event.getBearing() > -90 && event.getBearing() <= 90) { setBack(100); } else { setAhead(100); } }
The angle is relative to your robot's facing. So 0 is straight ahead of you. // El ngulo es relativo a su robot se enfrenta. Por lo que 0 es recto delante de usted This event can be generated if another robot hits you, in which case will return false. In this case, you will not be automatically stopped by the game -- but if you continue moving toward the robot you will hit it (and generate another event). If you are moving away, then you won't hit it.
event.isMyFault()
Este evento se puede generar si otro robot que realiza, en los que event.isMyFault() caso devolver false. En este caso, no se detiene automticamente por el juego -, pero si contina avanzando hacia el robot que lo golpe (y generar otro evento). Si se alejan, entonces no lo golpe.
Parameters:
event - the hit-robot event set by the game
//
Vease Tambien:
HitRobotEvent , Event
//------------------------------------------------- -------------------------------------------------------------------------HitRobotEvent
Class HitRobotEvent
public final class HitRobotEvent extends Event
Un HitRobotEvent se enva a onHitRobot () cuando el robot choca con otro robot. Puede utilizar la informacin contenida en este evento para determinar qu hacer
Method Summary
( Mtodos Resumen")
double getBearing ()
Returns the bearing to the robot you hit, relative to your robot's heading, in degrees (-180 <= getBearing() < 180)
// Devuelve el bearing en relacin con el robot te golpea, en relacin con el robot de la partida, en grados (-180 <= getBearing () <180)
double getBearingDegrees ()
Returns the bearing to the robot you hit, relative to your robot's heading, in radians (-PI <= getBearingRadians() < PI)
// Devuelve el bearing en relacin con el robot le golpe, en relacin con el robot de la partida, en radianes (-PI <= getBearingRadians () <PI). double getEnergy()
Checks if your robot was moving towards the robot that was hit. // Comprueba si el robot se mova hacia el robot que fue golpeado.
Called by the game to create a new HitRobotEvent. // Lo llama el juego para crear una nueva HitRobotEvent Parameters:
name - the name of the robot you hit
Method Detail
getBearing
public double getBearing ()
( Mtodo Detalle )
Returns the bearing to the robot you hit, relative to your robot's heading, in degrees (180 <= getBearing() < 180)
// Devuelve el bearing en relacin con el robot te golpea, en relacin con el robot de la partida, en grados (-180 <= getBearing () <180)
getBearingRadians
public double getBearingRadians ()
Returns the bearing to the robot you hit, relative to your robot's heading, in radians (PI <= getBearingRadians() < PI)
// Devuelve el rumbo en relacin con el robot le golpe, en relacin con el robot de la partida, en radianes ( -PI <= getBearingRadians () <PI)
Returns: the bearing to the robot you hit, in radians // el bearing a la que golpe robot, en radianes
getEnergy
public double getEnergy ()
Returns:
la cantidad de energa del robot que golpe
getName
public String getName()
Returns:
el nombre del robot que golpe
isMyFault
public boolean isMyFault()
If HitRobotEvent.isMyFault() returns true then your robot's movement (including turning) will have stopped and been marked complete
If HitRobotEvent.isMyFault() devuelve true entonces el movimiento del robot (incluyendo consultas) se ha detenido y ha marcado completa.
Note: If two robots are moving toward each other and collide, they will each receive two HitRobotEvents. The first will be the one if HitRobotEvent.isMyFault() returns true.
// Nota: Si dos robots se mueven uno hacia el otro y chocan, que recibirn cada uno dos HitRobotEvents. El primero ser el si HitRobotEvent.isMyFault() debuelve true.
Returns:
true si el robot se mova hacia el robot que fue golpeado, false en caso contrario
compareTo
public final int compareTo(Event event) Compara este evento a otro evento relacionadas con la precedencia. La precedencia de eventos es, ante todo, determinado por la hora del evento, en segundo lugar la prioridad de eventos, y por ltimo informacin sobre la prueba especfica.
.
Este primer mtodo se compara el tiempo de cada evento. Si la hora del evento es el mismo para ambos eventos, a continuacin, este mtodo de comparacin la prioridad de cada caso. Si el evento prioridades son iguales, entonces este mtodo se compara el evento de dos sobre la base de informacin de eventos especficos. Este mtodo es llamado por el juego con el fin de ordenar la cola de eventos de un robot para asegurarse de que los eventos se muestran en orden cronolgico .
Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class Event
Parameters:
event - the event to compare to this event.
//
Returns:
un valor negativo si este evento tiene mayor prioridad, es decir, deben estar inscritos antes del evento especificado. Un valor positivo si este evento tiene una prioridad ms baja, es decir, debe aparecer despus de que el evento especificado. 0 significa que la prioridad de los dos eventos son iguales
//--------------------------------------------------------------------------------------------------------------------------//-------------------------------------------------------------------------------- -------------------------------------------
onHitWall
void onHitWall(HitWallEvent event) Este mtodo es llamado cuando el robot choca con una pared. Usted debe reemplazar en el robot si quieres estar informado de este evento.
The wall at the top of the screen is 0 degrees, right is 90 degrees, bottom is 180 degrees, left is 270 degrees. But this event is relative to your heading, so: The bearing is such that turnRight (event.getBearing()) will point you perpendicular to the wall.
// La pared en la parte superior de la pantalla es de 0 grados, a la derecha es de 90 grados, el fondo es de 180 grados, a la izquierda es de 270 grados. Pero este caso es relativo a su partida, as que: El rodamiento es tal que turnRight (event.getBearing ()) ser punto perpendicular a la pared.
Example:
void onHitWall(HitWallEvent event) { out.println("Ouch, me golpeo una pared del bearing " + event.getBearing() + " grados."); }
Parameters:
event - el caso de golpear la pared establecida por el juego
See Also:
HitWallEvent , Event
//--------------------------------------------------------------------------------------------------------------------------HitWallEvent
Class HitWallEvent
public final class HitWallEvent extends Event
A HitWallEvent is sent to onHitWall() when you collide a wall. You can use the information contained in this event to determine what to do.
// Un HitWallEvent se enva a onHitWall () cuando chocan una pared. Puede utilizar la informacin contenida en este evento para determinar qu hacer.
Constructor Summary
HitWallEvent (double bearing)
Method Summary
double getBearing ()
Returns the bearing to the wall you hit, relative to your robot's heading, in degrees (-180 <= getBearing() < 180)
// Devuelve el rumbo en relacin con la que golpe la pared, en relacin con el robot de la partida, en grados (-180 <= getBearing () <180)
double getBearingDegrees () Deprecated. Use HitWallEvent.getBearing() instead. // Obsoletas. Utilice HitWallEvent.getBearing () en lugar. double getBearingRadians ()
Returns the bearing to the wall you hit, relative to your robot's heading, in radians (-PI <= getBearingRadians() < PI)
//Devuelve el rumbo en relacin con la que golpe la pared, en relacin con el robot de la partida, en radianes (-PI <= getBearingRadians () <PI)
Parameters:
bearing - the bearing to the wall that your robot hit, in radian
Returns: the bearing to the wall you hit, in degrees // el bearing a la que golpe la pared, en grados
getBearingRadians
public double getBearingRadians ()
Returns the bearing to the wall you hit, relative to your robot's heading, in radians (-PI <= getBearingRadians() < PI)
// Devuelve el bearing en relacin con la que golpe la pared, en relacin con el robot de la partida, en radianes (-PI <= getBearingRadians () <PI)
Returns: the bearing to the wall you hit, in radians // el bearing a la que golpe la pared, en radianes
//--------------------------------------------------------------------------------------------------------------------------//---------------------------------------------------------------------------------------------------------------------------
onScannedRobot
void onScannedRobot(ScannedRobotEvent event)
This method is called when your robot sees another robot, i.e. when the robot's radar scan "hits" another robot. You should override it in your robot if you want to be informed of this event. (Almost all robots should override this!)
// Este mtodo se llama cuando el robot ve a otro robot, es decir, cuando el radar del robot de exploracin "xitos" a otro robot. Usted debe reemplazar en el robot si quieres estar informado de este evento. (Casi todos los robots deben reemplazar este!)
Rules.RADAR_SCAN_RADIUS
Note that the robot's radar can only see robot within the range defined by (1200 pixels).
// Tenga en cuenta que el radar del robot slo puede ver robot dentro del rango definido por Rules.RADAR_SCAN_RADIUS (1200 pxeles).
Also not that the bearing of the scanned robot is relative to your robot's heading.
// Tampoco que el rodamiento del robot es escaneada en relacin con el robot de la partida
Example:
void onScannedRobot(ScannedRobotEvent event) { // Assuming radar and gun are aligned... //Suponiendo que la pistola de radar y se alinean if (event.getDistance() < 100) { fire(3); } else { fire(1); } }
If the gun and radar are aligned (and were aligned last turn), and the event is current,
and you call fire() before taking any other actions, fire() will fire directly at the robot.
//Tenga en cuenta: El juego ayuda a los robots en el fuego, de la siguiente manera: Si el arma y el radar estn alineados (y se alinearon la ltima vuelta), y el evento es actual, y llama de fire () antes de tomar cualquier otra accin, el fire () se dispara directamente en el robot.
In essence, this means that if you can see a robot, and it doesn't move, then fire will hit it.
// En esencia, esto significa que si usted puede ver un robot, y no se mueve, entonces el fuego lo golpe
AdvancedRobots will NOT be assisted in this manner, and are expected to examine the event to determine if fire() would hit. (i.e. you are spinning your gun around, but by the time you get the event, your gun is 5 degrees past the robot).
//AdvancedRobots NO contar con la ayuda de esta manera, y se espera que examinar el caso para determinar si el fire () golpeara. (Es decir, que estn girando alrededor de su arma, pero cuando usted consigue el evento, su arma es de 5 grados despus de que el robot).
Parameters:
event - the scanned-robot event set by the game
Vease tambien:
ScannedRobotEvent , Event , Rules.RADAR_SCAN_RADIUS
//--------------------------------------------------------------------------------------------------------------------------ScannedRobotEvent
Un ScannedRobotEvent se enva a onScannedRobot () cuando se escanea un robot. Puede utilizar la informacin contenida en este evento para determinar qu hacer
Nota: No debe heredar de esta clase en su propia clase de evento! La lgica interna de esta clase de eventos pueden cambiar. Por lo tanto, el robot puede que no funcione en futuras versiones de Robocode, si decide heredar de esta clase.
Called by the game to create a new ScannedRobotEvent. // Lo llama el juego para crear una nueva ScannedRobotEvent
Compares this event to another event regarding precedence. // Compara este evento a otro evento relacionadas con la precedencia
double getBearing ()
Returns the bearing to the robot you scanned, relative to your robot's heading, in degrees (-180 <= getBearing() < 180)
// Devuelve el rumbo en relacin con el robot que ha analizado, en relacin con el robot de la partida, en grados (-180 <= getBearing () <180).
double getBearingRadians ()
Returns the bearing to the robot you scanned, relative to your robot's heading, in radians (-PI <= getBearingRadians() < PI) // Devuelve el rumbo en relacin con el robot que ha analizado, en relacin con el robot de la partida, en radianes ( -PI <= getBearingRadians () <PI)
double getDistance ()
double getEnergy ()
Returns the heading of the robot, in degrees (0 <= getHeading() < 360) // Devuelve el heading del robot, en grados (0 <= getHeading () <360)
double getHeadingRadians ()
Returns the heading of the robot, in radians (0 <= getHeading() < 2 * PI) //Devuelve el heading del robot, en radianes (0 < = getHeading () <2 * PI)
double getLife()
Called by the game to create a new ScannedRobotEvent. // Lo llama el juego para crear una nueva ScannedRobotEvent Parameters:
name - the name of the scanned robot
Returns the bearing to the robot you scanned, relative to your robot's heading, in degrees (-180 <= getBearing() < 180)
// Devuelve el rumbo en relacin con el robot que ha analizado, en relacin con el robot de la partida, en grados ( -180 <= getBearing () <180)
Returns: the bearing to the robot you scanned, in degrees // el rumbo hacia el robot que escanea, en grados
getBearingRadians
public double getBearingRadians ()
Returns the bearing to the robot you scanned, relative to your robot's heading, in radians (-PI <= getBearingRadians() < PI)
// Devuelve el bearing en relacin con el robot que ha analizado, en relacin con el robot de la partida, en radianes (-PI <= getBearingRadians () <PI)
Returns: the bearing to the robot you scanned, in radians // el rumbo hacia el robot que escanea, en radianes
getDistance
public double getDistance ()
Returns:
la distancia al robot
getEnergy
public double getEnergy ()
Returns the energy of the robot. // Devuelve la energa del robot Returns:
la energa del robot
getHeading
public double getHeading ()
Returns the heading of the robot, in degrees (0 <= getHeading() < 360)
// Devuelve el heading del robot, en grados (0 <= getHeading () <360)
Returns: the heading of the robot, in degrees // el heading del robot, en grados
getHeadingRadians
public double getHeadingRadians ()
Returns the heading of the robot, in radians (0 <= getHeading() < 2 * PI) // Devuelve el heading del robot, en radianes (0 <= getHeading () <2 * PI) Returns: the heading of the robot, in radians // el ttulo del robot, en radianes
getName
public String getName()
Returns the name of the robot. // Devuelve el nombre del robot. Returns:
el nombre del robot
getVelocity
public double getVelocity ()
Returns:
compareTo
public final int compareTo(Event event)
Compares this event to another event regarding precedence. The event precedence is first and foremost determined by the event time, secondly the event priority, and lastly specific event information.
// Compara este evento a otro evento relac ionadas con la precedencia. La precedencia de eventos es, ante todo, determinado por la hora del evento, en segundo lugar la prioridad de eventos, y por ltimo informacin sobre la prueba especfica.
This method will first compare the time of each event. If the event time is the same for both events, then this method compared the priority of each event. If the event priorities are equals, then this method will compare the two event based on specific event information.
// Este primer mtodo se compara el ti empo de cada evento. Si la hora del evento es el mismo para ambos eventos, a continuacin, este mtodo de comparacin la prioridad de cada caso. Si el evento prioridades son iguales, entonces este mtodo se compara el evento de dos sobre la base de informacin de eventos especficos.
This method is called by the game in order to sort the event queue of a robot to make sure the events are listed in chronological order.
// Este mtodo es llamado por el juego con el fin de ordenar la cola de eventos de un robot para asegurarse de que los eventos se muestran en orden cronolgico
Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class Event
Parameters:
event - the event to compare to this event.
// caso de comparar a este evento. Returns: a negative value if this event has higher precedence, i.e. must be listed before the specified event. A positive value if this event has a lower precedence, i.e. must be
listed after the specified event. 0 means that the precedence of the two events are equal. // un valor negativo si este evento tiene mayor prioridad, es decir, deben estar inscritos antes del evento especificado. Un valor positivo si este evento tiene una prioridad ms baja, es decir, debe aparecer despus de que el evento especificado. 0 significa q ue la prioridad de los dos eventos son iguales. //--------------------------------------------------------------------------------------------------------------------------//-------------------------------------------------------------------------------- -------------------------------------------
onRobotDeath
void onRobotDeath (RobotDeathEvent event)
Este mtodo se llama cuando otro robot muere. Usted debe r eemplazar en el robot si quieres estar informado de este evento
Parameters:
event - The robot-death event set by the game
onWin
void onWin(WinEvent event)