Starting with a copy of your Java code for Project #4
("Dog Race"),
add the features described below.
Additional features
for in-class exam (t4.pde):
Blue bird flies slowly, back & forth, above horizon.
Grass along horizon:
green blades 20 pixels apart.
Small red triangles every 100 pixels,
along the bottom,from start to finish,
Within each track, draw a red line & text
every 100 pixels:
to indicate distance:
100, 200, 300, 400, etc.
As dogs race,
draw a red circle around the leading dog.
// You may use code like this, to draw the red circle:
stroke(255,0,0);
color( 0,0,0, 255 ); // Transparent fill.
ellipse( x, y, 50, 50 );
stroke(0); // Restore defaults.
Click the mouse near any dog
to move that dog back.
Add a button to drop a brown "bomb" from the blue bird.
If bomb gets near any dog,
send that dog back to the starting line!
See below for a summary of required features from Project #4.
Submit your completed code
as a file named "t4.pde"
in your folder on the website.
NOTE: Project #5 is due by
noon, Saturday, November 30th.
Required features from Project #4
(p4.pde):
Racetrack:
A racetrack with three parallel tracks (horizontally).
Dogs:
In each track, a Dog
moves
(a random amount)
whenever its button is clicked.
Each dog should be a different color,
and drawn with at least three shapes..
Buttons:
Four buttons are used to make the dogs move:
Three buttons have the name of a dog,
and are the same color as that dog. The fourth button moves ALL three dogs.
Varmits:
After the race begins, two small varmits
run back and forth between the tracks
(bouncing off the ends).
Messages
The title and author are displayed on the screen:
When a dog crosses the finish line, the winner's name is displayed.
Animation:
Dogs and varmits should all display some sort of animation, as they move.