This defines the Observer pattern's observer role that allows the BoardDrawing to observe a board game's game instance and react by redrawing figures.
A Command pattern to encapsulate method calls on a board game based upon clicking or moving graphical figures on the graphical display.
Abstract Factory for the figures to be used by the BoardDrawing.
This role defines a strategy (strategy pattern) encapsulating the algorithms to calculate the proper graphical position (x,y) for a figure that is located on a given location on a board game.
This role defines a strategy (strategy pattern) encapsulating the algorithms to determine the appearance of a prop used in a board game.
A tool to handle user interaction on board game figures.
An implementation of Drawing that is custom made to support storing figures that represent objects in board games and collaborate with factories and strategies to make board game graphics building and manipulation easy and make the graphics look appealing.
A Figure specifically representing some object in a board game, like a checker, a die, a card, or some other actionable object like a button.
A null object implementation of Command.
This package contains an experimental extension to MiniDraw, BoardGame, whose hotspots are especially geared towards supporting board games.
For further details, please consult "Flexible, Reliable Software - Using Patterns and Agile Development", by Henrik Baerbak Christensen, CRC Press 2010.
The package adds quite a few frozen spots to MiniDraw which then are configured by a set of hot spots for the particular board game. In the contents list, all interfaces are hot spots while concrete classes are frozen spots.
Review the 'breakthrough' example for an example of using BoardGame.
Copyright 2010 Henrik Baerbak Christensen Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
From the book: Flexible, Reliable Software, © CRC Press 2010. Author: Henrik B. Christensen, Aarhus University, Denmark