Project 3

CS 320

75 points, due Apr. 8, 2005

The main focus of this project is to add interactivity to your pool simulation. The user should be able to:

  1. Rack up the balls.
  2. Break.
  3. Take shots.
  4. Place the cue ball should it be pocketed, or to begin a game.
We'll need some new features for the pool table. Implement pockets. You should do this by extending the file format. In other words, you'll read number of pockets, pocket positions, etc. from the file. You'll need to add an object parameter that says, in effect, ``If a ball collides with me it is removed from the table.'' Visually, it would be cool if the ball, instead of instantaneously disappearing, disappears a bit more gradually --- for instance by decreasing it radius in steps. Also, note that a pool ball doesn't drop in a pocket as soon as it overlaps the pocket. It drops when its point of contact with the table is within the area of the pocket. You'll also need to add those two ``dots'' that define where the balls are racked and behind which the cue ball may be placed after being pocketed.

I'm purposefully being vague on the nature of the user interface. Let's see how you employ your imagination, creativity, and experience with other games to design an effective user interface for pool. If you'd like to run ideas by me, I'd be happy to comment on them.

I'd like to see you add a feature or two that I haven't mentioned here. Some sort of scoring, two player games, etc., for example.

Submitting Your Project

Your solution is to be e-mailed to me at kelliher@goucher.edu (not bluebird). All project files should be sent as attachments in a single e-mail. You may collect all the files into a single ZIP archive. You should send all files necessary for me to build your program from source (generally, this is all .h and .c files), as well as any documentation and test files. You should send an ASCII file, named README.txt, describing the rest of the attached files. I will build your program from source and run it for myself. Your project is due at the beginning of class on the 8th. My standard late penalty (10%/three days) will apply. The weekend no longer counts as a day, so if you turn your project in by 1:30 on the 11th, you'll only be one day late.



Thomas P. Kelliher
Wed Mar 30 09:08:01 EST 2005
Tom Kelliher