Robot.Robot_Status Class Reference
Inheritance diagram for Robot.Robot_Status:
Collaboration diagram for Robot.Robot_Status:

Public Member Functions

 Robot_Status ()
 
Object clone () throws CloneNotSupportedException
 

Public Attributes

int power
 
int charge
 
int health
 
int defense_boost
 
int[] capsules
 

Detailed Description

Represents current status of Robot, passed to Robot.act() method to let robot know its current health, charge, and capsules.

Definition at line 37 of file Robot.java.

Constructor & Destructor Documentation

Robot.Robot_Status.Robot_Status ( )

Constructor because I'd rather not capsules ever be null

Definition at line 62 of file Robot.java.

References Robot.Robot_Status.capsules.

Referenced by Robot.Robot_Status.clone().

62 { capsules = new int[0]; }

Here is the caller graph for this function:

Member Function Documentation

Object Robot.Robot_Status.clone ( ) throws CloneNotSupportedException

Overrides clone: see Java language documentation for explanation

Definition at line 65 of file Robot.java.

References Robot.Robot_Status.Robot_Status().

66  {
67  Robot_Status to_return = (Robot_Status)(super.clone());
68  to_return.capsules = capsules.clone();
69  return to_return;
70  }

Here is the call graph for this function:

Member Data Documentation

int [] Robot.Robot_Status.capsules

Current number and power of capsules.
Each capsule is represented by an element of the array.
The value of the element of the array is equal to the power of the capsule.
In-progress capsules are not represented; use getInvestedBuildPower() for that.

Definition at line 59 of file Robot.java.

Referenced by Robot.Robot_Status.Robot_Status().

int Robot.Robot_Status.charge

current charge.

Definition at line 43 of file Robot.java.

int Robot.Robot_Status.defense_boost

current defense boost

Definition at line 49 of file Robot.java.

int Robot.Robot_Status.health

current health.

Definition at line 46 of file Robot.java.

Referenced by DefenderBot.act().

int Robot.Robot_Status.power

remaining power for turn

Definition at line 40 of file Robot.java.

Referenced by DefenderBot.act().


The documentation for this class was generated from the following file: