Pages

Sunday, January 16, 2011

RoboBot color updated

First and foremost I would want to change my robots color. So here's the code:

setColors(Color robotColor, Color gunColor, Color radarColor); //robot's body, gun, and radar
//sample code
and here are the available colors for our robocode's robots:

black, blue, cyan, darkGray, gray, green, lightGray, orange, pink, red, white and yellow


setColors(Color.red,Color.blue,Color.green);

But then I would want every aspect of my roboBot's parts to change its color.. and here it is..

public void run()
{
setBodyColor(Color.pink);
setGunColor(Color.black);
setRadarColor(Color.blue);
setBulletColor(Color.cyan);
setScanColor(Color.green);
.
.
.
}


Share photos on twitter with Twitpic
(You can never remove pink in my life haha)

0 comments:

Post a Comment