From: Stefan F. <ste...@we...> - 2010-06-20 12:40:46
|
Erik: to continue the discussion, see my comments / questions: > The rule enforcing for tile laying in Rails has not changed (yet). > Enforcement is on my list, but it requires a more drastic change of the > current UI implementation. It will also consider the various approaches > (permissive, restrictive, semi-restrictive), with the default set > accordingly > for each game. > > [EV] A permissive check would be easy to add. All that's needed is adding a > call to a method that returns if a given track on a given hexside is part > of a route (to be inserted in GUITile around line 115). The other > approaches would require some more coding but need the same method call. What currently stops me somehow from implementing it there is the more general question, if those validity checks should be part of the UI-code or better handled by the backend? Most likely for the current implementation it does not matter, but in the longer run (at least for my understanding) the backend should provide the information about valid tile lays for the UI. This information should be passed to the UI via the action objects? I have not searched the archive of the development for the issue of client/server separation exactly, so I do not know, what your planning there, but I would have guessed, that you prefer to have as much in the backend as possible. But you are right: I can add a method to the algorithm package, which checks if a tile can be laid in any valid orientation on a specified hex, given the current network structure. Then this could be used either by the backend or the GUI to check the validitity. The only thing that might be different is the way to pass the handle to the networkgraph instance. > > > [EV] I'm on (or under) Windows, but I don't have any such problem either. > BTW I find the current tile description somewhat confusing. Someone > (Stefan?) has added the number of remaining tiles, which is good, but the # > sign in front of that is more commonly used to prefix the tile number, as > it is done in the Remaining Tiles panel. I would have put the number of > tiles in parentheses, as is also done to indicate the number of remaining > trains. > That was me, it was first used only for the panel with the correction mode activated (to test the constraints). But players complained, that they would like to have that in the standard panel as well, I merged the code there. And I remembered the usage of "#", but thought that would imply the number of remaining tiles , instead of the tile number (may be a Math deformation). Can be easily changed to parentheses. > The error popup on zero cash change is the standard implementation in > Rails, > > if you select a non-valid parameter, as those checks are done by the > backend. > Sorry for trapping the game by this. > > [EV] Accepting 0 as a no-op should easily fix that. > You mean that a zero entered should leave the correction mode? This is difficult as the deactivation of the correction mode uses a different action, than the cash correction itself. But I could capture it by the UI already with a different message (for example, that you have to use the menu to deactivate), that is true. Stefan |