From: Stefan F. <ste...@we...> - 2015-09-02 09:58:26
|
Answer see below. On 09/01/2015 08:23 PM, Martin Brumm wrote: > Am 01.09.2015 um 20:20 schrieb Stefan Frey: >>> >>> Target Hexes >>> >>> * Similar to destinations in 1856. Use the manual approach first and >>> replace that by an automatic determination later. >>> >>> I have adapted the code from 1880 by Michael to make that already >>> automatically. >>> >>> >> How did you solve the issue, when to check for connectivity? The 1844 >> rules specify an "immediate/anytime" condition, thus there is the need >> to trigger a check anytime a tile gets laid on the map. >> >> The correct way to do this is to create a MapModel that subscribes to >> all MapHex currentTile state variables. Then you can add a trigger to >> the MapModel that then calls the destination check for all companies >> that have outstanding working capital. > > Ok let me rephrase it, i have adapted Michaels Code from 1880 which > checked the Investor Connection that way that it will now check if the > Hex is a valid Vertex that shows up in the NetworkMap of a Company in > question. > > Now linking that into the tile laying routing hasnt been done yet but > its already in the Check Routine if a company should receive its full > IPO Cash. > > Regards, > Martin > Martin: sorry it was not meant as a critique. Instead as a suggestion how to implement what most likely is missing. It is much easier now in Rails 2.0 to achieve that in a structured way. I will try add some wiki pages soon on model/state/trigger classes and give examples how to use them. Stefan |