|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IBasicShipPeer
An interface that describes all the functions in ShipPeer that are available the call from Ship.
Method Summary | |
---|---|
Bullet |
fireComponent(int index)
WeaponComponent.fire() |
double |
getAngleComponentRadians(int index)
Returns the angle of the specified component in Radians |
double |
getAngleRemainingComponent(int index)
Returns the angleRemaining of the given index in radians |
boolean |
getAtBlindSpot(int index)
Decides whether the specified WeaponComponent is at the edge of its BlindSpot |
BlindSpot |
getBlindSpotWeapon(int index)
Returns the BlindSpot of the specified WeaponComponent |
double |
getFirePowerComponent(int index)
Returns the firepower for the specified component Only works for WeaponComponents |
double |
getGunHeatComponent(int index)
Returns the gunheat of the specified component Only works for WeaponComponents |
Mine |
mine(double power,
int index)
Places a mine with the given power from the component with the given index. |
void |
rotate(int index,
double angle)
Rotates the component by the specified angle in degrees. |
void |
setAdjustComponentForShipTurn(int index,
boolean independent)
Sets whether the component is independent or not |
void |
setBulletColor(int index,
Color color)
Sets the color for the bullets shot from a WeaponComponent
Only works for WeaponComponents. |
void |
setComponentColor(int index,
Color color)
Sets the color of the specified component |
Bullet |
setFireComponent(int index)
Same as fireComponent()
This function only executes once the execute() function has been called, instead. |
void |
setFirePowerComponent(int index,
double firepower)
Sets the firepower for the specified component Only works for WeaponComponents |
Mine |
setMine(double power,
int index)
Places a mine with the given power from the component with the given index. |
void |
setScanColor(int index,
Color color)
Sets the color of the Scan. |
Methods inherited from interface robocode.robotinterfaces.peer.IBasicRobotPeer |
---|
execute, fire, getBattleFieldHeight, getBattleFieldWidth, getBodyHeading, getBodyTurnRemaining, getCall, getDistanceRemaining, getEnergy, getGraphics, getGunCoolingRate, getGunHeading, getGunHeat, getGunTurnRemaining, getName, getNumRounds, getNumSentries, getOthers, getRadarHeading, getRadarTurnRemaining, getRoundNum, getSentryBorderSize, getTime, getVelocity, getX, getY, move, rescan, setBodyColor, setBulletColor, setCall, setDebugProperty, setFire, setGunColor, setRadarColor, setScanColor, turnBody, turnGun |
Method Detail |
---|
void rotate(int index, double angle)
index
- The index of the component that has to rotate.angle
- The angle to turn the component in degrees.Bullet fireComponent(int index)
WeaponComponent.fire()
index
- The index of the weapon that has to be fired.
Bullet setFireComponent(int index)
fireComponent()
This function only executes once the execute()
function has been called, instead.
WeaponComponent.fire()
index
- The index of the weapon that has to be fired.
double getAngleRemainingComponent(int index)
index
- The index of the component you want to know the remaining angle of
void setAdjustComponentForShipTurn(int index, boolean independent)
index
- The index of the component you want to change the dependency ofindependent
- true for independent movement, false if you want the component to be stuck to the ship.Mine mine(double power, int index)
power
- The power of the mineindex
- The index of the component that drops the mine
Mine
object that contains a variety of useful variablesMine setMine(double power, int index)
mine(double, int)
, but
drops the mine after the execute()
function is called.
power
- The power of the mineindex
- The index of the component that drops the mine
Mine
object that contains a variety of useful variablesvoid setComponentColor(int index, Color color)
index
- The index of the componentcolor
- the color you want to give the componentvoid setFirePowerComponent(int index, double firepower)
index
- The index of the componentfirepower
- The firepower you want to give the componentdouble getFirePowerComponent(int index)
index
- the index of the component
double getGunHeatComponent(int index)
index
- the index of the specified component
double getAngleComponentRadians(int index)
index
- The index of the component you want to get the angle from
BlindSpot getBlindSpotWeapon(int index)
BlindSpot
of the specified WeaponComponent
index
- The index of the specified WeaponComponent
BlindSpot
of the specified WeaponComponentboolean getAtBlindSpot(int index)
BlindSpot
index
- The index of the specified WeaponComponent
BlindSpot
, false otherwise.void setScanColor(int index, Color color)
index
- The index of the Radar you want to specify the Scan color forcolor
- The color you want the give the scan of the Radar.void setBulletColor(int index, Color color)
WeaponComponent
Only works for WeaponComponents. Can be set for seperate WeaponComponents.
index
- The index of the WeaponComponent
you want to set the color of the bullets forcolor
- The color you want to give the bullets.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |