Software Construction Assignment 2: Silly Game
|Due: April 4, 2017 @ 5pm. Please include a README.txt that has both partner's names and email addresses.|
Your 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 new version of the rules that guarantees that a game never lasts forever. 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 Parcheesi. 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 interface definitions for these components (in your programming language, or as comments if your language doesn't support such interfaces directly). [2pts]
Also develop a simple algorithmic strategy for playing Parcheesi automatically -- do not implement it, just think through the rules to figure out what would constitute a simple player that does not cheat. [1pt]
Hand in this assignment via canvas.