From: Erik V. <eri...@hc...> - 2005-12-11 21:31:04
|
I have committed code including part of a model/view implementation of individual fields in the Status and OR windows. This applies to the cash, trains, price and worth fields. The view is always the existing Field class, which I have extended a little. Each Model is one of a set of simple classes in the new game.model package. Where implemented, the Fields are now kept up-to-date by either - pulling the value on each paintComponent() call (Brett's method) or - pushing the value on each change via the Observer interface (my method) (worth is always pulled, as it must always be recalculated). The method can be selected by setting the boolean StatusWindow.useObserver. The difference is just a few lines of code. We can make a final choice later, e.g. once we are adding client/server separation (and I know what the choice then will be... :-)). This subproject is in an intermediate state. But everything should still work, except for one thing: the left-movement of the share price tokens in OR 1. This is because of the new behind-the-scenes processing of the no-trains case in the new OperatingRound. I will fix that later (or withdraw that particular change). Erik. |