2012-02-11

Robocode setColor



setColors

public void setColors(Color bodyColor,
                      Color gunColor,
                      Color radarColor)
Sets the color of the robot's body, gun, and radar in the same time.You may only call this method one time per battle. A null indicates the default (blue) color.
Example:
   // Don't forget to import java.awt.Color at the top...
   import java.awt.Color;
   ...

   public void run() {
       setColors(null, Color.RED, new Color(150, 0, 150));
       ...
   }
 
Parameters:
bodyColor - the new body color
gunColor - the new gun color
radarColor - the new radar color
See Also:
setColors(Color, Color, Color, Color, Color)setAllColors(Color)setBodyColor(Color)setGunColor(Color)setRadarColor(Color),setBulletColor(Color)setScanColor(Color)Color


setColors

public void setColors(Color bodyColor,
                      Color gunColor,
                      Color radarColor,
                      Color bulletColor,
                      Color scanArcColor)
Sets the color of the robot's body, gun, radar, bullet, and scan arc in the same time.You may only call this method one time per battle. A null indicates the default (blue) color for the body, gun, radar, and scan arc, but white for the bullet color.
Example:
   // Don't forget to import java.awt.Color at the top...
   import java.awt.Color;
   ...

   public void run() {
       setColors(null, Color.RED, Color.GREEN, null, new Color(150, 0, 150));
       ...
   }
 
Parameters:
bodyColor - the new body color
gunColor - the new gun color
radarColor - the new radar color
bulletColor - the new bullet color
scanArcColor - the new scan arc color
Since:
1.1.3
See Also:
setColors(Color, Color, Color)setAllColors(Color)setBodyColor(Color)setGunColor(Color)setRadarColor(Color)setBulletColor(Color),setScanColor(Color)Color


setAllColors

public void setAllColors(Color color)
Sets all the robot's color to the same color in the same time, i.e. the color of the body, gun, radar, bullet, and scan arc.You may only call this method one time per battle. A null indicates the default (blue) color for the body, gun, radar, and scan arc, but white for the bullet color.


 Example:
   // Don't forget to import java.awt.Color at the top...
   import java.awt.Color;
   ...

   public void run() {
       setAllColors(Color.RED);
       ...
   }
 
Parameters:
color - the new color for all the colors of the robot
Since:
1.1.3
See Also:
setColors(Color, Color, Color)setColors(Color, Color, Color, Color, Color)setBodyColor(Color)setGunColor(Color)setRadarColor(Color),setBulletColor(Color)setScanColor(Color)Color


setBodyColor

public void setBodyColor(Color color)
Sets the color of the robot's body.A null indicates the default (blue) color.


 Example:
   // Don't forget to import java.awt.Color at the top...
   import java.awt.Color;
   ...

   public void run() {
       setBodyColor(Color.BLACK);
       ...
   }
 
Parameters:
color - the new body color
Since:
1.1.2
See Also:
setColors(Color, Color, Color)setColors(Color, Color, Color, Color, Color)setAllColors(Color)setGunColor(Color)setRadarColor(Color),setBulletColor(Color)setScanColor(Color)Color


setGunColor

public void setGunColor(Color color)
Sets the color of the robot's gun.A null indicates the default (blue) color.


 Example:
   // Don't forget to import java.awt.Color at the top...
   import java.awt.Color;
   ...

   public void run() {
       setGunColor(Color.RED);
       ...
   }
 
Parameters:
color - the new gun color
Since:
1.1.2
See Also:
setColors(Color, Color, Color)setColors(Color, Color, Color, Color, Color)setAllColors(Color)setBodyColor(Color)setRadarColor(Color),setBulletColor(Color)setScanColor(Color)Color


setRadarColor

public void setRadarColor(Color color)
Sets the color of the robot's radar.A null indicates the default (blue) color.


 Example:
   // Don't forget to import java.awt.Color at the top...
   import java.awt.Color;
   ...

   public void run() {
       setRadarColor(Color.YELLOW);
       ...
   }
 
Parameters:
color - the new radar color
Since:
1.1.2
See Also:
setColors(Color, Color, Color)setColors(Color, Color, Color, Color, Color)setAllColors(Color)setBodyColor(Color)setGunColor(Color),setBulletColor(Color)setScanColor(Color)Color


setBulletColor

public void setBulletColor(Color color)
Sets the color of the robot's bullets.A null indicates the default white color.


 Example:
   // Don't forget to import java.awt.Color at the top...
   import java.awt.Color;
   ...

   public void run() {
       setBulletColor(Color.GREEN);
       ...
   }
 
Parameters:
color - the new bullet color
Since:
1.1.2
See Also:
setColors(Color, Color, Color)setColors(Color, Color, Color, Color, Color)setAllColors(Color)setBodyColor(Color)setGunColor(Color),setRadarColor(Color)setScanColor(Color)Color


setScanColor

public void setScanColor(Color color)
Sets the color of the robot's scan arc.A null indicates the default (blue) color.


 Example:
   // Don't forget to import java.awt.Color at the top...
   import java.awt.Color;
   ...

   public void run() {
       setScanColor(Color.WHITE);
       ...
   }
 
Parameters:
color - the new scan arc color
Since:
1.1.2
See Also:
setColors(Color, Color, Color)setColors(Color, Color, Color, Color, Color)setAllColors(Color)setBodyColor(Color)setGunColor(Color),setRadarColor(Color)setBulletColor(Color)Color