CSPP 51090 Software Construction Assignment 3 |
| Due: 5:00pm April 22, 2003 |
Your first task is to modify a program that comes with comments and test suites. The program implements a silly game: 21. The N players meet at a table and roll a dice. Every player rolls the dice once per round. They add up their scores. A player can skip his turn or declare that he is done. A player is eliminated if/when his score surpasses 21. End of game: The game is over when all players are eliminated or done. Scoring: The winners are those players with the maximum score. The given program allows players to roll the die, to skip a turn, or to declare that they are done. It implements both an automated machine player and an interface to a human player. Problem 1: With the given program, a game may last forever. Design and implement a strategy that guarantees that a game ends. Don't forget to modify the documentation and the test suites. [6pts] Problem 2: Modify the given program so that a player can roll the die twice per turn. Don't forget to modify the documentation and the test suites. [1pt] Your second task is to prepare the term project. The goal of the project is to implement and maintain a game called Bazaar. Eventually we will run the game via a server into which independent programmers can plug in automated players. Write the one-page "story" for the project. The story must identify the major components (concepts) of the game and how they interact (use cases). Include Java-style interface definitions for these components. [2pts] Also develop a simple algorithmic strategy for playing Bazaar automatically. [1pt] |
| CSPP 51090 Software Construction |