What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated May 30, 2008 by sssilver
Labels: Featured, Phase-Design
MonopolyLogic  
Logic of the Monopoly Game class

Introduction

This class is the sole responsible for the entire Monopoly game logic. Being used by the Command Dispatcher, this class is responsible for making gamestate changes to the Monopoly games, handling turns, rolling dice, issuing random Chances and everything else that occur during a Monopoly game in terms of the game logic itself.

Philosophically, an instance of this class represents a single game with its board and players. It is therefore instantiated each time a game goes live.

Gamestate

The class stores the following data for the gamestate:

Starting a game

The game is generally started by calling the overridden Game::start() function. In MonopolyGame, this function does the following:


Sign in to add a comment