Computer Science 15-112, Fall 2011
Class Notes:  Practice (through week 9 (graphics + animations))


1.       Events Practice
Write the 3 sample animations here:
http://kosbie.net/cmu/fall-09/15-110/handouts/events/EventsPractice.html

2.       BallAroundSquare
Write this simple animation:
http://tinyurl.com/ballAroundSquare
Note: If this applet does not run in your web browser, you can try running this equivalent jar file: ballAroundSquare.jar

3.       Click it!
Modify any of the 3 animations from #1 so that it is a very simple game:  the player tries to click on the moving square.  Each click in the moving square scores a point.  Each click outside the moving square loses a point.  Display the score.  When the score gets to 5 (win) or -5 (loss), display a very simple game over screen that indicates if the player won or lost, and then restart the game if the user presses 'r', or quit (with System.exit(0)) if the user presses 'q'.  Beep for any other input at that time, including any mouse input.

4.       Some Flags
If you have excess time, you can fill it by drawing some flags:
https://www.cia.gov/library/publications/the-world-factbook/docs/flagsoftheworld.html
     


carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem   -   carpe diem