Packages and Access Levels

Projects

3.13

Implement the game of Bogart (Figure 3-17). Your implementation has to handle only two players. (Hint: Create a class FourSidedDie which extends Die. Alternately, if you have done Exercise 3.12, you can use the PolyhedralDie class.)

Figure 3-17. Like Pennywise, the game of Bogart is an invention of James Ernest. Used with permission of the designer.

Bogart

Players: 2-6

Object: To be the first to either accumulate 30 chips or roll all five dice at once without rolling a 1.

Setup: The pot is initially empty and all players start with no chips. New chips will be added to the pot from an inexhaustible bank.

Play: When your turn begins, add one chip from the bank to the pot. Roll a four-sided die. If you get a 1, you have aced out and your turn ends. Otherwise, you may either take the pot or keep going. If you keep going, add two chips to the pot and roll two dice. If you roll a 1 on either die, you have aced out. Otherwise, you may keep going, this time adding three chips and rolling three dice. Continue until you either ace out, decide to take the pot, or successfully roll all five dice without acing out.

Категории