A BattleEndedEvent is sent to OnBattleEnded(BattleEndedEvent) when the battle is ended. You can use the information contained in this event to determine if the battle was aborted and also get the results of the battle.
Contains the battle results returned by Results when a battle has ended.
Contains the battle rules returned bywhen a battle is started and when a battle is completed.
This event is sent to OnBulletHitBullet(BulletHitBulletEvent) when one of your bullets has hit another bullet.
This event is sent to OnBulletHit(BulletHitEvent) when one of your bullets has hit another robot.
This event is sent to OnBulletMissed(BulletMissedEvent) when one of your bullets has missed, i.e. when the bullet has reached the border of the battlefield.
Condition is used to define custom WaitFor(Condition) and custom events for an AdvancedRobot. The code below is taken from the sample robot named samplecs.Target. See the samplecs/Target.cs for details.
This event is sent to OnDeath(DeathEvent) when your robot dies.
The superclass of all Robocode events.
A prebuilt condition you can use that indicates your gun has finished turning.
A HitByBulletEvent is sent to OnHitByBullet(HitByBulletEvent) when your robot has been hit by a bullet. You can use the information contained in this event to determine what to do.
A HitRobotEvent is sent to OnHitRobot(HitRobotEvent) when your robot collides with another robot. You can use the information contained in this event to determine what to do.
A HitWallEvent is sent to OnHitWall(HitWallEvent) when you collide a wall. You can use the information contained in this event to determine what to do.
This is the simplest robot type, which is simpler than the Robot and AdvancedRobot classes. The JuniorRobot has a simplified model, in purpose of teaching programming skills to inexperienced in programming students. The simplified robot model will keep player from overwhelming of Robocode's rules, programming syntax and programming concept. Instead of using getters and setters, public fields are provided for receiving information like the last scanned robot, the coordinate of the robot etc. All methods on this class are blocking calls, i.e. they do not return before their action has been completed and will at least take one turn to execute. However, setting colors is executed immediately and does not cost a turn to perform.
Super class of all events that originates from the keyboard.
A KeyPressedEvent is sent to OnKeyPressed(KeyEvent) when a key has been pressed on the keyboard.
A KeyReleasedEvent is sent to OnKeyReleased(KeyEvent) when a key has been released on the keyboard.
A KeyTypedEvent is sent to OnKeyTyped(KeyEvent) when a key has been typed (pressed and released) on the keyboard.
A MessageEvent is sent to OnMessageReceived(MessageEvent) when a teammate sends a message to your robot. You can use the information contained in this event to determine what to do.
A MouseClickedEvent is sent to OnMouseClicked(MouseEvent) when the mouse is clicked inside the battle view.
A MouseDraggedEvent is sent to OnMouseDragged(MouseEvent) when the mouse is dragged inside the battle view.
A MouseEnteredEvent is sent to OnMouseEntered(MouseEvent) when the mouse has entered the battle view.
Super class of all events that originates from the mouse.
A MouseExitedEvent is sent to OnMouseExited(MouseEvent) when the mouse has exited the battle view.
A MouseMovedEvent is sent to OnMouseMoved(MouseEvent) when the mouse has moved inside the battle view.
A MousePressedEvent is sent to OnMousePressed(MouseEvent) when the mouse is pressed inside the battle view.
A MouseReleasedEvent is sent to OnMouseReleased(MouseEvent) when the mouse is released inside the battle view.
A MouseWheelMovedEvent is sent to OnMouseWheelMoved(MouseWheelMovedEvent) when the mouse wheel is rotated inside the battle view.
A prebuilt condition you can use that indicates your robot has finished moving.
A prebuilt condition you can use that indicates your radar has finished turning.
This advanced robot type allows you to set a rate for each of the robot's movements. You can set the rate for:
The basic robot class that you will extend to create your own robots. Please note the following standards will be used: heading - absolute angle in degrees with 0 facing up the screen, positive clockwise. 0 <= heading < 360. bearing - relative angle to some obj from your robot's heading, positive clockwise. -180 < bearing <= 180 All coordinates are expressed as (x,y). All coordinates are positive. The origin (0,0) is at the bottom left of the screen. Positive X is right. Positive Y is up.
Building your first robot
Container class for debug properties
This event is sent to OnRobotDeath(RobotDeathEvent) when another robot (not your robot) dies.
Contains the status of a robot for a specific time/turn returned by Status.
A RoundEndedEvent is sent to OnRoundEnded(RoundEndedEvent) when a round has ended. You can use the information contained in this event to determine which round that has ended.
Constants and methods that defines the rules of Robocode. Constants are used for rules that will not change. Methods are provided for rules that can be changed between battles or which depends on some other factor.
A ScannedRobotEvent is sent to OnScannedRobot(ScannedRobotEvent) OnScannedRobot()} when you scan a robot. You can use the information contained in this event to determine what to do. Note: You should not inherit from this class in your own event class! The internal logic of this event class might change. Hence, your robot might not work in future Robocode versions, if you choose to inherit from this class.
A SkippedTurnEvent is sent to OnSkippedTurn(SkippedTurnEvent) OnSkippedTurn()} when your robot is forced to skipping a turn. You must take an action every turn in order to participate in the game.
This event is sent to OnStatus(StatusEvent) every turn in a battle to provide the status of the robot.
Wrapper for .NET Thread, secured according to robocode rules.
A prebuilt condition you can use that indicates your robot has finished turning.
This event is sent to OnWin(WinEvent) when your robot wins the round in a battle.
A robot that implement IBorderSentry is a robot type used for keeping other robots away from the borders, i.e. guarding the borders in order to prevent "wall crawlers".
Robots that implement IBorderSentry have 400 extra life/energy (500 in total), but is placed at the border of the battlefield when the game is started.
Border sentry robots cannot move away from the border area, and they can only make damage to robots that are moving into the border area. The size of the border area is determined by the battle rules.
This type of robot is intended for use in battles where robots should be forced away from the borders in order to prevent "wall crawlers".
Border sentry robots does not get scores, and will not occur in the battle results or rankings.
Robots that implement IDroid have no scanner, but an extra 20 life/energy. This class is intended for use in teams.
Method signature for Test method of Condition