PROJECTS #1 & #2
The big, bad monster
chases the brave, little hero,
who chases after the gold,
while the sun moves across the sky.

Make up names for your characters (hero and monster) and design a pattern for each that uses all of the following Library functions (methods):

		rect( ... )
		ellipse( ... )
		line( ... )
		triangle( ... )
The monster chases the hero, who chases after the gold. When the mouse is clicked, deduct 50 points, move the gold to a random position, and reset everything to starting positions: hero and monster on opposite sides of the screen, at random heights, with the gold at a random position near the center.

Declare global variables for the position coordinates (X,Y) of each object. Variable names should start with a small letter (NOT a Capital) for the first word, but you may Capitalize any additional words. If the names are "Igor" and "Vladimir" then global declarations might look something like this:

		//// GLOBALS ////
		float goldX, goldY;
		float igorX, igorY;
		float vladX, vladY; 
and the Java code to move the monster might look something like this:
		// Monster chases hero //
		igorX=  igorX + (vladX-igorX) / 150;
		igorY +=  (vladY-igorY) / 150;
		if ( dist( vladX,vladY, igorX,igorY ) )   {
			// Monster catches hero!
			scor -= 100;
			reset();		// Move to opposite sides.
		}
NOTE: Please don't call them Igor and Vlad! Make up your own names!

In the setup() method, reset everything to starting positions:

		void setup() {
			size( ..., ... );
			reeset();
		}

Your code for the draw() method should not actually draw anything.
Instead, have it call other methods to do all the work.

		void draw() {
			// Next frame. //
			scene();
			monster();
			hero();
			gold();
		}
Write your own Java code for each of these methods, and also for mousePressed() keyPressed() .

The scene is a grassy field (filling most of the screen), under a light blue sky, with the sun moving slowly from left to right a few times per minute. Display a title and score at the top, and your name in the lower-left corner.



For project #2, use functions with arguments to draw parts of the creatures on the screen, and add some animation (such as legs that "walk" or arms that "wave" or wings that "flap" or eyes that blink, etc.)

For example, code to draw the hero might look something like this:

		void drawVlad( float x, float y, float w, float h ) {
		  // Draw hero centered at (x,y) with body width w and height h //
		  rectMode( CENTER );
		  fill( ... );
		  rect( x,y, w,h );
		  ...
		  text( "Vlad", x-w/3, y-h/4 );		// Name on shirt.
		  // Head //
		  float headHeight= 20;
		  head( headHeight, x, y-h-headHeight/2 );
		  // Legs (starting at hips). //
		  ...
		  leg( 40, x-w/2, y+h/2 );    		// legs start at hips.
		  leg( 40, x+w/2, y+h/2 );
		  // Arms //
		  float armLength=h/3;
		  ...
		  arm( armLength,  x-w/2, y-h/2 );  	// arms at shoulders
		  arm( -armLength,  x+w/2, y-h/2 );
		}
		void head( float hh, float xh, float yh ) {
		  // Draw head and eyes //
		  ellipse( xh, yh, hh, hh*3/4 );
		  eye( xh-hh/6, yh-hh/4 );    		// left eye
		  eye( xh+hh/6, yh-hh/4 );    		// right eye
		}

Also add a few birds that fly across the sky and drop bombs (when a key is pressed: 1 for the first bird, 2 for the second, etc.) If bomb hits monster, move him to one side of the screen at a random height.