////  Q1.java -- CST 112 Quiz #1
////  Jason Moreira

///global declaration///
float horizon;
float flagX=width/2,flagY=20;
float targetX=600, targetY=300;                // Coordinates of the bullseye.
float dartX=200, dartY=300, dartDX=100, dartDY=0;    // Coordinates & velocity for dart.
int score=0;

////////  SETUP //////// 
void setup() {
  size(800, 600);

  
////Scene////  
  background (0,100,225); //sky
  int horizon;
  horizon = height / 4;
  fill(255,0,0);
  fill( 0,255,0 );
  rect( 0,horizon, width,height*3/4 ); // grass
fill(255);
  fill (225,225,225);
  rect( width/2,20, 120,90 );   //flag
  fill(225,0,0);
  rect( width/2,20, 120,30 );
  fill(225,0,0);
  rect( width/2,80, 120,30);
 fill(255,0,0);
  ellipse( targetX,targetY, 200,200 );
  fill(225,225,225);
  ellipse( targetX,targetY, 150,150);
  fill(225,0,0);
  ellipse( targetX,targetY, 100,100);
  fill(225,225,225);
  ellipse( targetX,targetY, 50,50);
}

  ////action////

void action() {
  fill( 0, 200, 0 );
  triangle( dartX-20,dartY, dartX-40,dartY-20, dartX-40,dartY+20 );
  ellipse( dartX,dartY, 80,20 );
  fill(0);
  triangle( dartX+35,dartY-3, dartX+35,dartY+3, dartX+60,dartY );
}


//////// MESSAGES:  title, author, score, etc. //////// 
void messages() {
  fill(0);
  textSize(24);
  text( "CST 112 Quiz #1", 10, 20 );
  text( "SCORE:", width*3/4,20 );
  textSize(12);
}