From: John A. T. <ja...@ja...> - 2006-07-10 20:01:54
|
brett lentz wrote: >Perhaps we should approach this in two stages: > >1. Legal route calculation. We should allow the user to select their >desired route, and only provide information about the legality of the >route. Here, we could potentially re-use our current hex-selection >mechanism to allow users to select the hexes involved in their desired >route. Then, we can do the calculations involved in finding the value >of the designated route. > >2. Best route calculation. As a user-configurable option, we should >allow toggling between user-selected routes and computer-decided >"best" routes. In the case where a tactical decision needs to be made, >we should simply offer a selection of the highest value routes in each >category or fall back to user-selected routing. > >I think that #1 is around 80% of the work we need to do. Once we've >got that done, handling #2 might have a more clear path. > > The difference between them is simply #1 doesn't have to choose the highest valued set of routes, but has to do all the UI code for selecting them. If the goal is to get it working for 1830 and similar games, I suggest getting automatic route selection is both easiest and most useful. The complication comes in other games where the president is not required to take the highest-paying set of routes or in games like 1844 where the choice between equal sets has other side effects, such as activating a tunnel or mountain, and therefore the president should be allowed to choose among them. In either case, what we need is an algorithm that generates the results and determines the result of using that route, including the total earned for dividends and company treasury (1860, 1895, 1824, and 1837 all have the latter), as well as any side effects such as activation of mountains/tunnels. The wrapper around that algorithm can initially be just the simply maximum for 1830 and we can get fancier later. -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 |