From: John A. T. <ja...@ja...> - 2006-07-10 23:22:09
|
brett lentz wrote: >You don't need a list. All you need is the logic for determining >whether a route is legal or not. i.e. Contiguous track segements, >passing through at least one city with the owner's token, not passing >through blocked cities, not going red-to-red, etc. > >Instead of generating the list of all legal routes, you simply apply >the single route given by the user to the set of rules used for >determining the validity of the route. If valid, we return the value >of the route and move onward. > > I still think the "test" portion of the "generate and test" is the complicated part, and little is saved but much lost by leaving out the route computation. Aside from that, giving feedback to the user will require more work, as you have to figure out which hexes might be legal to add to what he has clicked already. I don't see this being sufficient (if any) savings in effort versus just doing it right in the first place. -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 |