thrownewError("Robot Type does not get health assigned: " + robotType);
}
this.missileCount = 0;
this.xp = 0;
this.coreDelay = 0;
this.weaponsDelay = 0;
this.supply = 0;
this.totalDamageDealt = 0;
}
/**
* Adds a custom observation to the match file, such that when it is analyzed, this observation will appear.
*
* @param observation
*/
publicvoidaddMatchObservation(Stringobservation)
{
thrownewError("addMatchObservation Not implemented");
}
/**
* Queues an attack on the given location to be performed at the end of this turn.
*
* @param loc
*/
publicvoidattackLocation(MapLocationloc)
{
if (loc.distanceSquaredTo(getLocation()) <= getType().attackRadiusSquared)
{
totalDamageDealt += getType().attackPower;
map.attackLocation(loc, getType().attackPower);
// System.out.println("Robot on Team: " + getTeam() + " had dealt: " + getType().attackPower + " damage");
}
}
/**
* If breakpoints are enabled, calling this method causes the game engine to pause execution at the end of this round, until the user decides to resume execution.
*/
publicvoidbreakpoint()
{
thrownewError("breakpoint Not implemented");
}
/**
* Broadcasts a message to the global message board.
*
* @param channel
* @param data
*/
publicvoidbroadcast(intchannel, intdata)
{
thrownewError("broadcast Not implemented");
}
/**
* Builds a structure in the given direction, queued for the end of the turn.
*
* @param dir
* @param type
*/
publicvoidbuild(Directiondir, RobotTypetype)
{
thrownewError("build Not implemented");
}
/**
* Returns whether the given location is within the robot's attack range.
*
* @param loc
* @return
*/
publicbooleancanAttackLocation(MapLocationloc)
{
if (loc.distanceSquaredTo(getLocation()) <= getType().attackRadiusSquared)
{
returntrue;
}
returnfalse;
}
/**
* Returns whether the robot can build a structure of the given type in the given direction, without taking delays into account.