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



On Sat, October 29, 2005 11:24 am, Vincent Povirk said:
>> copy of the Freecell code until it looked like Bakers Game.  I am hoping
>> our resident experts will tell us there is a way to reuse code in
>> different games.
> Remind me why we can't just do (load "file-with-common-code.scm"). Or
> in the case of Bakers Game (load "freecell.scm") (define
> (whatever-rules-have-changed) (whatever-we-changed-them-to)).
>
There is absolutely no reason we can't do that. It just so happens that we
never have.

I certainly want to do this for spider. We have 1, 2 and 4 suit spider
with a bug in bugzilla calling for 3. Each game is virtually identical. In
fact, I think that when you define one spider game the others can be
derived merely by changing the initial conditions: i.e. what suits you
dish out in the first place. Although Will o the Wisp and Spiderette could
also benefit from the common code, but not as simply.

 - Callum





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