Open Jeswing opened 8 years ago
Walker w; void setup(){ size(400,400); w= new Walker(); background(255); } void draw(){ w.display(); w.walk(); }
Tab 2
class Walker{ int x; int y; Walker(){ x= width/2; y= height/2; } void display(){ stroke(0); ellipse(x,y,100,100); fill(300,100,100); } void walk(){ int random= int(random(6)); if(random==0){ x++; } if(random==1){ x--; } if(random==2){ y++; } if(random==3){ y--; } if(random==4){ x++; } if(random==5){ y--; } } }
Hello world
Hello Mercury, Venus, Earth, Mars, Asteroid field, Jupiter, Saturn, Uranus, Neptune, Not Pluto, And the SUN,
Tab 2