From: Erik V. <eri...@xs...> - 2006-12-31 17:42:38
|
I have committed code to show the number of available 'base' tokens and the total number of tokens in both the GameStatus and the ORPanel. The format is <available>/<total>. Also included are some minor changes, and an empty BaseTokenMove class as a start to make token laying undoable. Currently, token laying does not follow the "move" pattern that we use for most other items (trains, certificates, money), and that makes undo/redo very easy to implement. (Tile laying is the other exception, but that was pretty straightforward to handle.) I'm currently pondering whether or not it is worthwhile to restructure the code to make token laying follow this pattern as well (each lay would then become a transfer of a Token object between two TokenHolder objects). While thinking about this I also keep in mind that different token types exist (e.g. port tokens occur in several games). It might be useful to have a generic Token class from which specific token types can be subclassed. (the existing Token class would then be renamed to GUIToken or such). You'll be aware that I already fairly consistently refer to the usual tokens as BaseTokens. Erik. |