ByteBot
The ByteBot class is the base class required for robot functionality. It contains useful methods and fields to interact with the game.
Classes
Direction
Enum (Vector2)
Represents the direction the robot is facing.
Possible Values
NORTH(0, 1), EAST(1, 0), SOUTH(0, -1), WEST(-1, 0)
Fields
Vector2 vector
Methods
public Direction right() - Returns the direction to the right of the current direction.
public Direction left() - Returns the direction to the left of the current direction.
TurnDirection
Enum
Represents a direction to turn. Used as a parameter for the turn() method in ByteBot.
Possible Values
LEFT, RIGHT
Methods
void attack(Vector2 attackPos)
Launches an attack to attackPos position. Will do nothing if it is not your attack turn. Deals 20 damage if the enemy is at attackPos.
void moveForward()
Moves the robot forward in the direction it is facing.
void turn(TurnDirection dir)
Turns the robot in the given direction (LEFT or RIGHT).
Getters
ByteBotValues getValues()
Returns the ByteBotValues instance for this robot.
Methods to Overwrite
public void OnGameStep()
Called every game step (attack or defense) BEFORE OnAttackStep() or OnDefenseStep().
public void OnAttackStep()
Called every attack step (your robot is attacking).
public void OnDefenseStep()
Called every defense step (your robot is defending).
ByteBrawl
0