CS21 Lab 7:

Top-Down Design for two-dice pig

Top-down design due March 19
Final game due March 26

Please read through the entire lab before starting! Also, as always, run update21 to create your cs21/labs/07 directory. Write your programs for lab 7 in this directory.

Two-Dice Pig

Our lab this week and next is to write a dice game called two-dice pig. This is a "user vs computer" game, where each player takes turns rolling two dice, trying to reach 100 points (see rules below).

For this lab you will use top-down design. We are giving you two weeks to complete this program. However, we require your initial top-down design this Saturday (March 19) and the full implementation the following week (March 26).

Remember, for the design of a program, you should have:

Here is a simple example of a top-down design.

Examples, Requirements, and Tips

Here are some examples of the two-dice pig game, to help you see how it works:

Special proceedures for this two-week lab:

You have some freedom in how you want your game to look. Here are our requirements for the game:

Optional Challenges

Here are a few optional challenges for this game. If you do these (just for fun, no extra points!), please copy your working game to a new file: cp twodicepig.py twodicepig-extra.py

Submit

Once you are satisfied with your program, hand it in by typing handin21 in a terminal window.