
john code
By: a guest on
May 8th, 2012 | syntax:
Java | size: 0.45 KB | hits: 15 | expires: Never
for (int i = 0;i<10;i++){
int hpos = r.nextInt(9);
int vpos = r.nextInt(9);
int size = r.nextInt(5);
boolean create = true;
planet x = new planet(hpos,vpos,size,"neutral","grey");
planetList[i]=x;
if (planetList[i].getColor().equals("grey")){
g.setColor(Color.GRAY);
}
g.fillOval(hArray[planetList[i].getHorizontal()], vArray[planetList[i].getVertical()],100, 100);
create=false;
}