//Ashley Lizza float left=200, right=250, top=400, bottom=350; float center=225; float ballX=40, ballY=200, ballDX=4, ballDY=2; float AshX=100, AshY=300, AshDX=10, AshDY=20; float HeadX=10, HeadY=2, HeadDX=5, HeadDY=15; void draw () { //next frame background (100, 250, 10); scene(); } void scene() { // The table fill(100, 250, 100 ); strokeWeight(5); stroke( 200, 30, 0 ); rect (50, 50, 400, 300); } void setup () { size(500, 500); AshX= width/10; //height and width AshY= height/30; reset(); } void Ash () { //// Move & draw Ash rectMode( CENTER ); fill (5, 255, 5); //Ash rect (AshX, AshY, 50, 100); fill (0, 255, 225); ellipse(AshX, AshY-60, 40, 40); //head moves with body //call Ashley } void Ashley () { //move Ash if (AshX > right || AshX < left) AshDX= -AshDX; AshX= AshX + AshDX; AshY= AshY + AshDY; fill (0, 20, 255); noStroke (); //display Ash AshShow (AshX, AshY); } void AshShow(float X, float Y) { //show on screen fill ( 250, 70, 70); rect ( X, Y, 30, 70); fill (255, 0, 0); ellipse (X, Y, 50, 50); eye (X-8, Y+ 80); eye (X+8, Y+ 80); } void eye(float x, float y) { // draw eye fill (255, 0, 0); ellipse (X+8, X-8, 10, 10); fill (0, 0, 250); ellipse (X, Y-2, 5, 5); } void legs (float x, float y) { // Ash legs stroke(0); line(80, 160, 80, 160); line(100, 160, 120, 180); } void reset () { // Reset ballX= left+20; ballY= top+20; } void mouseClicked() { AshX = mouseX;// body moves with mouse AshY = mouseY; background(255, 0, 20); } void keyPressed () { if (key == 'q') exit(); if (key == 'r') reset(); } ///dog?Dog d= new Dog (); class Dog{ float x=100, float y=150; float dx=3, dx=2; float w=80, h=30; Void move () { x+=dx if (x) right> { dx=-dx; } Void show () fill (100, 0, 0); rect (x,y,w,h); }