Don't like ads? PRO users don't see any ads ;-)
Guest

john code

By: a guest on May 8th, 2012  |  syntax: Java  |  size: 0.45 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. for (int i = 0;i<10;i++){
  2.                                 int hpos =      r.nextInt(9);
  3.                                 int vpos =      r.nextInt(9);
  4.                                 int size = r.nextInt(5);
  5.                                 boolean create = true;
  6.                                
  7.                                 planet x = new planet(hpos,vpos,size,"neutral","grey");
  8.                                
  9.                                 planetList[i]=x;
  10.                                 if (planetList[i].getColor().equals("grey")){
  11.                                         g.setColor(Color.GRAY);
  12.                                 }
  13.                                         g.fillOval(hArray[planetList[i].getHorizontal()], vArray[planetList[i].getVertical()],100, 100);
  14.                                         create=false;
  15.                         }