Modify a text file: $/midterm-grade.pde
$/midterm-grade.pde
/* SPECIFICATIONS: (from CST 112 Midterm exam, 2011 Nov. 18) /10 THE SCENE: 800x600, sky & desert, grass. Score. Signature. + EXTRA[+3]: hills. + EXTRA[+5]: waving grass waves toward hero. /10 GREEN HERO: follows mouse. (Green head, except when hit). /10 RED BALL: travels diagonally: 5x,2y. (0.4 slope). /10 BALL HITS WALL: Bounce off "walls" (reverse dir in X or Y). /10 HERO HITS BALL: Ball reverses dir in X only. Add 3 to score. /10 Face turns pink FOR 5 FRAMES. + EXTRA [+3]: also make ball bounce back (in X only), when hit by hero.) /10 BLUE BOMB: On click, create "bomb" (blue 15x30). Fall 10p/frame. /10 Randomly change X (up to 20 px left or right), each frame. + EXTRA[+5+5]: accelerate faster and/or vary X randomly by up to 10 px. /10 BOMB HITS HERO: Lose 20 pts, background becomes black for that frame, /10 Hero's face turns gray for the next 10 frames. /10 FIVE PURPLE BULLETS: Created every second. (20x10 rect, 100 px apart). Set of bullets moves right (50px/frame). + EXTRA[+3]: Same height as ball plus or minus a random value of up to 20. + EXTRA[+5]: bullets randomly move a few pixels up or down each frame! /10 ANY BULLET HITS HERO: X within 100, y within 10. Lose 10 points, background becomes light-purple for that frame. /10 CODING STANDARDS. Fully modularized, comment precedes each function, meaningful names. === TOTAL === 130+29 */