Aisleriot: Any way to automatically restart game upon layout affecting option change?

This was brought up in passing in a previous bug report about mid-game option changes (, but this particular case was never really addressed.

To see what I'm on about, fire up Klondike and before moving anything, toggle the three-card deal option. Then try to play the already dealt game. While it will still play correctly, the waste slot will still adhere to the original setting (showing one card if deal-three was unchecked originally, or vice versa.)

Admittedly in Klondike this is just a minor cosmetic issue, and only for one game since it'll fix itself upon starting a new game. But if one were to add a hypothetical "Include Aces" option to Gaps, it would have to add (or remove) an extra column of slots and redeal. But I'm not sure how to go about doing that.

As an experiment I tried adding a call to (new-game) to Klondike's apply-options precedure:

> (define (apply-options options)
>   (set! deal-three (cadar options))
>   (new-game)
> )

but it didn't really work. It appears at first to do nothing upon changing the option, but then clicking on a card redeals but scrambles the layout, before a second click finally straightens everything out.

  Any ideas?

Zach Keene

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]