You are to design and build a tic-tac-toe game which will allow a single player to play against the computer. The design is to be split into Model and View portions (Designing for Two is an older link that explained model-view in to the 2002 class who had not used it in assignment 1). The Model is to be exclusively concerned with the logical aspects of the game and know nothing about the graphical representation. The View is to concern itself only with graphical representation and know nothing about the game itself, One partner is to handle the Model, the other the View.
Phase 1 Deliverables: A use case diagram, class diagram and an Interaction diagram. Please zip up your Rose files and send them to theTA, not to me). A Design Review will follow immediately afterwards (see schedule) with each partner presenting his/her side of the project.
Phase 2 Deliverables: a working java application ready to run, plus all source code, zipped up and delivered to the TA.
Resources: A working MouseBox class with the following methods:
public void mouseHasBeenClicked() This method
is empty and designed to be overridden in classes that inherit from
public void setBackground(Color c): Service routine to set the
background colour. If no icon is in the box, it will all be this colour.
public void setIcon(String gifFile): Service routine to set the icon in the
box to the gif designated by the string.
public void setMessage(String message): Service routine to put the message
string in the box. Overly long strings will be clipped.
You must treat this as your only graphical resource. A zip file with the mouseBox.java file in it as well as a test bed is available.
It is labelled GameDemo; it is actually only a top level game frame with an array of 4 TestBox objects wired into it (TestBox is a class derived from MouseBox). The game frame was created automatically by NetBeans visual tools. The TestBox was wired in using about seven lines of code which are all in the constructor. I will discuss this in class before you are due to go to code.
26 January, 2005