Programming Assignment 1d - Solitaire, Part 4

Object-Oriented Programming with Java, Spring 2008


Due Date

This assignment is due by 11:30 p.m. on Tuesday, 29 April.

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

The Problem

Implement an interactive graphical solitaire game using a game-independent front end and a back-end based on your playerAPI. In particular, you'll be developing a controller to connect the GUI view with the API model:

quasi-model-view-controller

The Solitaire GUI

The solitaire GUI is a game-independent front-end for solitaire card games. The class directory /export/home/class/cs-310/1d contains the GUI-classes jar file solitarieGUI.jar and class Javadoc; point your browser at /export/home/class/cs-310/1d/doc/index.html for the latter.

The solitaire GUI has been designed to be minimal and game independent; the design was guided by the philosophy that it should be possible to implement features, not necessarily easy to do so. However, it may be that the GUI is missing features that make it impossible to implement your game. In those cases send me some e-mail describing the problem and I'll see what changes need to be made to the solitaire GUI.

To insure stability for the final days of the project, the solitaire GUI will be frozen two days before the due date (that is, it will be frozen on Saturday, 26 April). With the exception of bug fixes that don't alter the GUI, no changes will be made to the GUI after it's been frozen.

Testing GUI

The jar file monkeysGUI.jar in the assignment directory contains a testing version of the GUI; the two jar files have identical interfaces and are interchangeable. The testing is based on crazy-monkey play. When you put monkeysGUI.jar in your classpath instead of solitaireGUI.jar, running your code causes the GUI to repeatedly make moves between every pair of piles in the game, sending your code move events for each move made. Your code should handle all the moves without throwing exceptions. Turned-in code will be tested against monkeysGUI.jar.

Jar Timestamps

Both monkeysGUI.jar and solitaireGUI.jar contain a time-stamp class created at the same time as the jar file. If you make a copy of the jar files and you run into problems you suspect may be related to the jar files, the first thing you should do is check your copy's time-stamp class against the time-stamp class in the assignment-directory jar files.

You can get a jar file's time-stamp class with the command

$ jar tf solitaireGUI.jar | grep TS
solitaireGUI/TSApr141822.class

$

The time-stamp format is TSmmmddhhmm.class where mmm is the three letter representation for the month, dd is the day, hh is the hour (24-hour clock) and mm is the minutes past the hour when the jar file was created. In the example above, the jar file was created on 14 April at 6:22 p.m.

The Player API

If, while developing the controller, you discover that your player API implementation or documentation can be improved, you may make those changes and turn your implementation and documentation again. If your API code compiles correctly, it and the documentation will replace the existing versions in the assignment directory.

Remember to keep your documentation current with your modified API. You should check your API and documentation against these design guidelines to provide a measure of quality control as you make your modifications.

Turn-In

You should turn-in your controller to the 1d.controller assignment. Your turn-in should include at least one package directory, you may have more as you see fit. Unlike previous assignments, your package directories don't need to have specific names.

You can turn-in revisions to your player API to the 1d.playerAPI assignment. Even though you are turning-in to 1d.playerAPI, your revised jar file will appear in the proper 1b subdirectory. Your turn-in for the player API should follow the rules used in previous assignments.

If the code you submit compiles successfully, the turn-in program makes a shell script that runs your game. The shell script (and associated jar file) is stored in /export/home/class/cs-310/1d/games/g and is called g, where g is the name of game you've implemented. The shell script runs with the solitaireGUI.jar; giving the -m command-line option runs the script with monkeysGUI.jar.


This page last modified on 8 April 2008.

Creative
    Commons License