Public name As String ' Name of robot Public desiredspeed As Long ' desired velocity of the robot. -10 to 10 Public bodyturn As Long ' rotation of robot. -5 to 5 Public gunturn As Long ' rotation of gun. -10 to 10 Public radarturn As Long ' rotation of radar. -15 to 15 Public radararc As Long ' scan width of radar. 0 to 15 Public bodycolor As Long ' robot colors. 24bit color values. (eg &hFF0000 is red) Public guncolor As Long Public radarcolor As Long 'File IO. All files given .rbf extension. attempts to specify an extension in the filename are ignored. Public Sub appendfile(ByVal fname As String, ByVal text As String) Public Function getfile(ByVal fname As String) As String Public Sub writefile(ByVal fname As String, ByVal text As String) Public Sub debugprint(ByVal a As Variant) ' displays message and pauses vbrobots Public Sub TellAudience(ByVal a As Variant) ' appends message to the match log. limit 1 per game. Public Sub TransferEnergy(ByVal id As Long, ByVal amount As Double) ' transfers energy to another robot. 20% goes to waste Public Sub exec(ByVal a As String) ' executes a statement Public Function eval(ByVal a As String) As Variant ' evaluates an expression 'The following is read only: Public MouseX As Double ' x coordinate of mouse in the arena, if it's there. Public MouseY As Double ' y coordinate of mouse in the arena, if it's there. Public Index As Long ' index of your robot Public ArenaWidth As Long ' width of arena Public ArenaHeight As Long ' height of arena Public XPos As Double ' your robot's x coordinate in the arena. Public YPos As Double ' your robot's y coordinate in the arena. Public dtcrobot As Boolean ' true if you detected a robot Public cldrobot As Boolean ' true if you collided with a robot Public cldmissile As Boolean ' true whenever a missile blast causes your robot damage Public cldaim As Long ' angle to the last collision Public cldid As Long ' id of the robot you collided with or the robot that shot the missile that caused you damage Public cldenergy As Double ' energy of missile or energy of robot you collided with Public energy As Double ' your energy level. Public shields As Double ' your shield level. if it reaches 0, your robot is forced to use energy shields, which costs you 1 unit of energy per turn Public gunheat As Double ' heat of the gun. increases when you fire. decreases over time. higher values reduce the effectiveness of your missiles. Public dtcenergy As Double ' energy of detected robot Public dtcid As Double ' id of detected robot Public scandist As Double ' distance to the detected robot. Public bodyaim As Long ' angle of robot, from 0 to 360. 0 is north (upward), and it increases clockwise Public gunaim As Long ' angle of gun Public radaraim As Long ' angle of radar Public speed As Double ' current speed of robot Public dtcx As Double ' x coordinate of detected robot Public dtcy As Double ' y coordinate of detected robot Public turncount As Long ' number of turns since start of game Public GamesLeft As Long ' the number of games left in the match Public RobotCount As Long ' total number of robots in the match Public RobotsLeft As Long ' number of robots still alive in the current game Public Function AngleOf(ByVal X As Double, ByVal Y As Double) As Double ' angle from 0,0 to x,y Public Function LengthOf(ByVal X As Double, ByVal Y As Double) As Double ' length of line from 0,0 to x,y Public Sub stall(ByVal i As Long) ' causes the robot to shut off for i turns. results in 1 unit of energy gain per turn unless the No Recharge rule is enabled. Public Sub fire(ByVal nrg As Double, ByVal range As Double) ' fires a missile that detonates when it comes within the specified range of another robot (besides your own). When gunheat is 0, the missile is charged with nrg*4 units of energy. Public Function Request(ByVal id As Long, param As Variant) As Variant ' communicates with another robot and returns the result Public Function isFriend(ByVal i As Integer) As Boolean ' returns true if that robot is on your team