xxxxxxxxxx
37
var cat;
var speed;
function setup() {
noStroke();
createCanvas(400, 400);
print("hello world");
print(10);
cat = 5;
speed = 2;
}
function draw() {
background(220);
fill (255,cat,0);
ellipse(cat,100,40,40);
ellipse(width/2,height/2,20,20);
cat = cat + speed;
if(cat > width){
speed = speed * -1;
}
if(cat < 0) {
speed = speed * -1;
}
}