//Marcelo Eisenberg assignment 9/17
float manX;

void setup()
{
  size(800,600);
  reset();
}

void reset()
{
  manX=100;

}

void draw()
{
  background(100,220,100);
  
  //signature
  fill(0,150,225);
  noStroke();
  textSize(16);
  text("Marcelo E.",10,20);
  
  //instructions
  text("Press any key to move the man and click the mouse to reset",10,40);
  
  fill(255,255,255);
  stroke(0,0,0);
  
  //head
  circle(manX,200,75);
  
  //body
  line(manX,237,manX,350);
  
  //legs
  line(manX,350,manX-50,450);
  line(manX,350,manX+50,450);
  
  //arms
  line(manX,280,manX-50,260);
  line(manX,280,manX+50,260);
  
}

void keyPressed()
{
  //moves man forward when any button is pressed
  manX=manX+5;
}

void mousePressed()
{
  //resets man to original position when mouse is clicked
  reset();
}
