Project 1 (200 Pts): Freecell
Due: Thursday, July 13
FAQ | About Demos
In this project, you will develop the solitaire game Freecell.
(Windows users are probably very familiar with this game.)
The rules for the card solitaire game Freecell can be found at Solitaire
Central. See also freecell.org for information about
the game and implementations.
You are to develop a suite/framework of classes and code in Java to
allow the user to play Freecell in a GUI. You should first make sure
your code works outside the GUI environment so that you are not
developing (and debugging!) both the GUI (the view) and the
model and controllers concurrently.
Part 1: Understanding a Codebase
An important part of Java (and coding in general) is understanding and
using other people's code. For this project, I am providing you with
a codebase, solitaire.jar. You can view the code online. You will need to read and
understand the code before trying to write additional code. I also
generated the Javadocs for the code, but you will probably get more out of reading the code.
Besides reading the code, you should make sure that you can run the
code, to better understand what the code does. To run the code, you
must include cardimages.jar in your
CLASSPATH. (Review the lecture notes about how to do this.)
Part 2: Designing your game
You should think about the components of the game and adhere to the
rules of the game, described in the links above. Model the game so
that you can easily and clearly separate the functionality between
classes.
Part 3: Designing your GUI
For full credit, you must implement the following features in the GUI:
- Allow users to move cards appropriately; enforce the rules
of moving cards.
- Handle when the user wins the game
- A menu that allows the user to
- Start new games
- Quit the game
- Undo the last move
Opportunities for Extra Credit
You must have the above requirements implemented before receiving any
extra credit. You can earn up to 25 points extra credit.
- Allow multiple "undo" operations. (Up to 5 points)
- Allow user to "retry" or restart game from the beginning. (Up to
3 points)
- Autoplay: automatically move the cards to the foundation pile.
For additional points, implement "conservative" auto play--only move
cards that cannot be used in play (keep foundation piles even). (Up
to 10 points)
- Keep track of the best time to complete the game. Include a
timer in the GUI so that player knows how long the current game is taking.
(Up to 5 points)
- Keep track of the number of moves to complete the game. Keep
track of the fewest moves to complete the game, even after quitting
the game. (Up to 3 points)
- Allow user to customize the look and feel of the application and
save the settings. (Up to 5 points)
- Move stacks of cards. (Up to 5 points)
- Other extensions of your choosing.
Packages
Use the package hierarchy that we've discussed all semester.
Java Docs
Generate and submit Java Docs for all of your classes. Make sure that
the Javadocs are viewable from online.
README
Your README file should contain
- Your name
- Assignment name
- Date
- High-level description of the assignment and what your program(s) does
- A list of submitted files
- The online location of your Java Docs, e.g., http://copland.udel.edu/~sprenks/cisc370/docs.
(This is just an example location; the docs at the location are not
complete.)
- Instructions for running your program
- Describe your program's design and how you separated
functionality between classes.
- Describe any limitations to your program--what you did not
complete implementing.
- Any other information you want Ke or Sara to know
Test Plan
You must write up how you tested your program. Describe how you
tested individual, groups of classes, and the entire application.
This plan will be the starting point for your demo with Ke.
Submission
Submit a printed version of your assignment (script file) at the
beginning of class on Thursday, July 13. You will schedule I time to
present your demo to Ke the following Monday-Wednesday.
Electronic Submission Organization
Your submission directory will look something like this:
- sprenkle/
- project1/
- solitaire/
- Provided code
- Your code
- ...
- README
- docs/ (the HTML documentation)
Email a gzipped tar file of your assignment directory, which
includes the the Java files, the class files, the docs, and README to
Ke (kli at cis.udel.edu) before Thursday, July 13 at 11:59:59 p.m.
The name of your zipped submission should be
lastname-project1.tar.gz
(or .zip or whatever the
appropriate extension). The subject line should be "[Your Name]
CISC370: Project 1 Submission".
Please do not submit your code from earlier assignments.
You may need to create a temporary location that contains your
submission so that you do not submit code from earlier assignments.
If you have any questions about submission, ask early!
We will follow similar directory structures in future submissions.
Grading (200 pts)
- Correctness (does the application work and provide all required
functionality): 70 pts
- Organization (design, separation of concerns/functionality,
inheritance relationships): 40 pts
- Testing (as demonstrated in test plan and in demo): 30 pts
- Style (readability of code): 30 pts
- Documentation (completeness, correctness, defense of design choices): 30 pts
This problem is based on a problem from Owen Astrachan, who wrote
the solitaire classes.