Project 9

CSU 670 Fall 2007
Out: November 13, 2007
Due on November 20, 2007.
We want to turn this into a positive experience and we want to get all players to at least play the game correctly. And some players should be really good at making money.

I was thinking that you as experienced software developers had learned to test your programs. In your first course you have learned to write test cases before you write the program. That especially applies in a more complex project of the complexity of the SDG.

The test cases here have the form:

1. History, to create a specific game state or even better:
an XML document that describes the store.
2. Instructions for your player how to behave in the future, e.g., don't buy in next move.
3. Program that checks whether the history that YOUR player
   creates starting in the state of 1. is correct.
So here the tests are not just input/expected output pairs. For example, when you don't buy, you may create derivatives in many different sequences. Make sure that your test cases cover the entire game. For every possible scenario described in the requirements document there must be a test case.

PART 1: TESTING TESTING TESTING

Create a mock player (http://en.wikipedia.org/wiki/Mock_object) to make controlled moves and test whether YOUR REAL player reacts correctly to the mock player. In addition, create a SDG state creator (kind of multiple player mock objects) that is parameterized by a history object. The state creator will create the state that exists after the history has executed. Now check that your player reacts correctly in that state. Create a history from the game and check the history for all rules, for example:
If you don't buy, do you create enough derivatives at a lower price?

if someone buys a derivative, do you deliver the raw material in the next move?

Do you create a raw material of the correct type.
You need a history checker because there are many ways to play the game correctly. It is not enough to check for one expected, correct output.

PART 2: Second SDG game competition

game competition:
submit your player by 10pm EST Tuesday, November 20, 2007
for the second CSU 670 SDG Competition.
How to submit?
Create a directory with a name X as described below
and put your files into the directory X.
/home/lieber/sdg/1/X

X must contain files
/home/lieber/sdg/2/X/X.{exe,jar}
and may contain any others.

X has the form:
FirstNameSoftwareDeveloper1_FirstNameSoftwareDevdeloper2
in alphabetical order, e.g.,
Kate_Sloan or Matt_Ryan.

PART 3: Share your testing software

Put your test cases and test software up on the wiki so that others can re-use it with acknowledgement. The more students reuse your testing software the better for you.