CS 680
Spring, 2003
Ethan Bolker
hw3 - the game package (2)
Due: Wednesday, February 19, 4 PM (in class).
Use the new version of the game package $CS680/games2.
You will find an ambitious solution to some of this assignment
in the next release of the game package $CS680/games3.
Much of the grade for this assignment will depend on how well you test
the code you write - so be sure your memo discusses your testing.
- Port your game, as specified in $CS680/hw2/cPort.html.
-
Write driver Tournament that allows two ComputerPlayers to
compete against one another. Tournament should require no interactive input
from the user. When the game is
over it should report the final position and the winner of the game.
Call it this way:
java -classpath whatever Tournament Gamename Player1 Player2
You can't use Backtrack (since it's interactive) and Speedy is pretty
dumb. You may need to write a slightly more sophisticated
ComputerPlayer to test your Tournament.
-
Refactor the factory classes in the game package so that GameFactory
and PlayerFactory each inherit from the abstract class
AbstractFactory. That class should contain as much as possible of
what's common to the two existing Factory classes.
Turn in
- one team copy of your ported game and the memo discussing how you
designed and tested it. Discuss too how you worked together as a team.
- hard copy of your Java source code (in a
fixed width
font ) for problems 2 and 3
- a memo discussing your design, coding and testing.
You may draw UML diagrams neatly by hand if you wish
(there are tools that will draw the boxes and arrows but you can waste
a lot of time tinkering with them...)
Don't submit copies of .java files that you did not
change. If you made just a few changes in a file, please highlight
the changes so that I don't have to reread lots of Jia's code.
Leave source code in a hw2 subdirectory of your cs680 course
directory. Do not alter any permissions.
Back to the CS680 home page.