Previous Topic: CRC Cards
Next Topic: GridBagLayout
Monopoly Game
In this class we started a CRC design of the classic Monopoly game.
We started out by listing the following classes:
- Board
- Player
- Dice
- Cell
- Jail
- Banker
- Game
- Account
- ChanceCard
- CommunityChestCard
- House
- Hotel
We eliminated some of these as we sent and when time ran out we had the
following:
Class: Property
Responsibilities:
GetRent
GetOwner
GetStatus
Collaborations
Account
Class: Board
Responsibilities:
Initialize
Collaborations
Cell
Class: Banker
Responsibilities:
AddHouses
RemoveHouses
AddHotel
RemoveHotel
Collaborations
Account
Class: Cell
Responsibilities:
Landing
Collaborations
none
Class: Game
Responsibilities:
Initialize
Play
AnnounceWinner
Collaborations
Player
Bank
Property
Class: Player
Responsibilities:
RollDice
DrawCard?
Collaborations
Account
Class: Account
Responsibilities:
AddMoney
RemoveMoney
AddProperty
RemoveProperty
Collaborations
none