int x,y;
int dx=2,dy=2;
int x1,y1;
int dx1=3,dy1=3;


void setup(){
size(640, 360);
x= 255;
y= 153;
x1=150;
y1=50;
}
void draw(){
background();
man();
monster();
move();
move1();
}
void background(){
  background(0,100,200);
fill(122, 208, 15);

stroke(255);
point(width * 0.5, height * 0.5);
point(width * 0.5, height * 0.25); 
stroke(0, 153, 255);

 stroke(255, 153, 0);
rect(0,100, width, height);


}
void man(){

fill(255);
ellipse(x, y, 72, 72);
}
void monster(){
  fill(255);
ellipse(x1,y1, 30, 30);

  
}
void move(){
  x = x + dx;
  y = y + dy;
  if(x>width) dx = -dx;
  if(x<0) dx = 2;
  if(y>height) dy = -dy;
  if(y<0) dy = 2;
  
}
void move1(){
  x1 = x1 + (x - x1)/50;
  y1 = y1 + (y - y1)/50;
  x1 = x1 + dx1;
  y1 = y1 + dy1;
  if(x1>width) dx1 = -dx1;
  if(x1<0) dx1 = 3;
  if(y1>height) dy1 = -dy1;
  if(y1<0) dy1 = 3;
  
}

