From: Erik V. <eri...@hc...> - 2006-08-13 13:42:36
|
It's a very old message that I'm replying here to. I have looked it up because it was about the last time that we discussed the subject of special properties. I'm revisiting this subject, partly because I've encountered it in a different context in 1835, and partly because I just discovered that the existing extra tile laying code for 1830 is broken. There are two aspects to be considered (applied to tile laying): 1. The game mechanics should be aware of extra tiles to be laid, and, if necessary, extend a player's turn to allow for it. This worked 7 months ago for 1830. 2. Make the user clearly aware of this special situation. The only clue so far was that the current player highlight did not move after laying the first tile. To do something about this, I have just added an extra prompt message (in red) to the existing prompts above the map about the option to lay an extra tile or token. However, my main concern is that the current way in which the UI and the game engine communicate, pretty complex as it already is, will not easily accommodate different special property types and their application rules. I'm always keeping in mind that one day we want to turn this into a client/server application. For a solution I would propose the following approaches. 1. The game mechanics: I think the best approach is to generalise a mechanism that already exists in some contexts, i.e. train buying and share buying and selling, and that I have found very fruitful so far. The generic mechanism would be, that after each user action the UI would get a fresh and complete list of all allowed actions at that point, including state information about who's turn it is etc., by one or two calls to the Model. This will reduce (or hopefully completely eliminate) the current need for the UI to have it's own (partial) state memory. For this end we will need a new "allowed actions" class hierarchy, derived from some abstract base class. The result of the above-mentioned "what can I do" call would then be a List of objects which are instances of subclasses of that base class. The existing class BuyableTrain would become such a subclass. An example of such an object would be "Lay a tile on hex XY". This would already work for the special extra tile lays. We can't yet restrict normal tile lays, so we would have a blanket "lay a tile anywhere" object instead. Once we have route awareness, this would be replaced by a series of objects, one for each hex where a tile can be laid. (I think this approach would also make the future client/server separation easier: a main component of the client-to-server information stream could exist of a serialized version of this List). I'm looking for a good and shortish name for the base class. We have already consumed Action, Move and Option. AllowedAction might do, or UserOption, but I would prefer a short one-word name that can easily be incorporated in its subclass names. What about Play? 2. The UI: A corollary of the above approach would be, that the player turn will never be over if the allowed-actions List is not yet empty. So we will need an always-available Done button (in fact the current No Tile and No Token buttons have that role, but for clarity I would prefer to get rid of those). We could still accommodate an automatic end of a player turn if the allowed-actions list is empty, but we should then tell the user about that. What about a popup saying something like "End of turn for A, it's now B's turn" that would appear *each* time when a new player (or President) gets the turn, regardless whether the turn change was automatic or triggered by pressing the Done button? To exercise special actions that fall outside the normal sequence of events in a round, we could add a menu bar, with options that would only show up (or be active) when such an action can be exercised. In 1830, this would apply to buying Privates and the M&H/NYC swap. The above is mainly of interest for the OR. I'm not sure if we should extend this to the SR, where we already have the situation that Done/Pass must always be pressed to end a player turn. However, here also we could implement an automatic turn end (with warning) if there is nothing a player could do (i.e. the allowed-actions list is empty). This was a long story, I hope it is clear enough. Any comments? Erik. > -----Original Message----- > From: rai...@li... > [mailto:rai...@li...] On Behalf Of > Brett Lentz > Sent: 26 January 2006 21:51 > To: rai...@li... > Subject: RE: [Rails-devel] M&H > > > >> Also note: If the swap is done before the president's share > >> is bought, this swap sets the par value for the NYC. > > > >I don't think so. The free PRR share that comes with the C&A > >does not have a price either, until the PRR is opened by > >buying the presidency. AFAIK the same holds for the NYC. > > > > > Hmm... I'll doublecheck the rule book. I'd swear I remember > encountering this with 1830 pc game, and seeing that it > forces you to set the par value if it's unset. > > > >> I finally got a chance to check out your updates. I think the > >> extra button in the status window is perfect. It's not > >> intrusive, but it let's the player owning the M&H know that > >> his ability is available. > >> > >> I think we should do this same sort of thing for the other > >> special abilities, especially the C&StL. Right now, after a > >> company purchases the C&StL, the UI inexplicably maintains > >> the "Lay Tile" buttons after the lays it's normal tile, and > >> doesn't give any sort of notification that we're allowing for > >> the C&StL tile lay before moving on to laying tokens. > > > >Yes, I agree, but I have not yet found a good way to do that. > > > >Perhaps we should add a message line over the full width of the > >SR and OR windows in which we can show a one-line message about > >what the player having the turn is supposed to do. Here we could > >also add a reminder about special properties that can be exercised. > > > > That would be helpful. > > Currently, I think we do just fine with the turn order flow. > There's some minor UI cleanups I want to do, but overall I > think we're doing well enough. The only exception being that > when we deviate, we need to tell the user why we're altering > the normal turn order. So, maybe a good thing to add is > changing the text over the UpgradesPanel to indicate we're > allowing for the C&Stl Optional Tile Lay. > > I think that, ideally, we should just provide a button for > jumping outside the normal turn order, to activate the > special ability, and then return back to the normal turn > order at the same point we left. > > Perhaps rather than a new message line, we should just set > the Title on the JFrame to indicate the current stage of the > turn. That would be a bit less intrusive. What do you think? > > > ---Brett. > > > ------------------------------------------------------- |