Programming Assignment 1a - Solitaire, Part 1

Object-Oriented Programming with Java, Spring 2009


Due Date

This assignment is due by 6:00 p.m. on Tuesday, 3 March.

See the assignment turn-in page (last modified on 14 February 2008) for instructions on turning in your assignment.

The Problem

Go to Solitaire Games and pick one of the listed solitaire games to implement. One you’ve picked, e-mail me (rclayton@monmouth.edu) your choice so I can keep track. Each person implements a game not implemented by anybody else.

For convenience, here’s the list of games; un-linked-to games are unavailable. Solitaire Games has detailed descriptions of the games and a glossary.

  1. Aces and Kings
  2. Aces Up
  3. Acquaintance
  4. Agnes Bernauer
  5. Agnes Three
  6. Alaska
  7. Alliance
  8. Antares
  9. Apophis
  10. Auld lang Syne
  11. Australian Patience
  12. Baker’s Dozen
  13. Baker’s Game
  14. Beleaguered Castle
  15. Black Hole
  16. Busy Aces
  17. Canfield
  18. Cruel
  19. Demons and Thieves
  20. Diavolo
  21. Double Klondike
  22. Eagle’s Wing
  1. East Haven
  2. Eight Off
  3. Family Plot
  4. Forty Thieves
  5. Fourteen Out
  6. Freecell Duplex
  7. Freecell
  8. Gaps
  9. Gold Rush
  10. Golf
  11. Great Wheel
  12. Interchange
  13. Josephine
  14. King Albert
  15. Klondike
  16. La Belle Lucie
  17. Lady Jane
  18. Monte Carlo
  19. Moving Left
  20. Mrs. Mop
  21. Osmosis
  22. Penguin
  1. Pyramid
  2. Rank and File
  3. Rouge et Noir
  4. Russian Solitaire
  5. Scorpion
  6. Sea Towers
  7. Spiderette
  8. Spider
  9. Spotlight
  10. Storehouse
  11. Tarantella
  12. Terrace
  13. Thirteens
  14. Three’s Company
  15. Three Shuffles and a Draw
  16. Triple Klondike
  17. Vertical
  18. Virginia Reel
  19. Windmill
  20. Yukon
  21. Zerline

Your code should be essentially be a game referee. It should set up and conduct the game, making sure the rules are followed, and determine when the game is lost or won, keeping score as required by the game. Your code should not actually play the game.

You are developing a back end for a solitaire game. The technical term for what you’ll be developing is the model part of the model-view-controller pattern.

You may assume the player is knows how to play the game but isn’t necessarily fair. Instances of game misplay should be detected and handled appropriately by, for example, ending the game. You should not assume that the player will be human.

Player Public Classes

Your code should offer a set of publically-accesible classes in a package called playerAPI (the case is exact). You may include other packages if you wish, but playerAPI is the only package a front-end to your game needs to access directly. Java interfaces are not required in playerAPI, but you may use them if you wish.

It must be possible to implement a front-end to your game entirely through the public entities in the playerAPI package, passing requests to the back-end and getting repsonses back. Your back-end implementation must not perform GUI- or terminal-based I-O. You may use such I-O to develop and test your code, but it must be possible to use your back-end without having it perform any GUI- or terminal-based I-O.

Code Structure

Your source configuration should have a top-level player-API package directory and should not have a top-level package directory called “doc”. Other than those two requirements, you may structure your code source as you see fit.

Documentation

Your code should be fully documented using JavaDoc. In particular, it should be possible to figure out how to play your game by reading the documentation created from the contents of your playerAPI package. Your documentation should include overview and package documentation. The overview documentation should be in a file called overview.html and may be in any of the package directories you submit (for some reason having to do with frames (?), javadoc won’t show your overview documentation if you have less than two packages). The package documentation should be in a file called package.html in each package directory. You can review Documentation Comments starting on page 162 in Horstmann and Cornell to pick up on the details.

The example documentation is the HTML documentation transmogrified into PostScript; the HTML documentation looks different from the example.

This documentation is part of the writing requirement for this class.


This page last modified on 9 February 2009.