Hi Danny,
On Sat, 01 Sep 2012 01:08:35 -0000
"dannyjones183" <dannyjones183_at_yahoo.com> wrote:
> I was surprised that you didn't include the equations to computer the
> maximum number of cards that can be moved.
Didn’t include them where? In the source code to the expander? In
the post to this mailing list?
> The following is
> equivalent to what I use in my C source.
>
>
> Ecolm = number_of_empty_columns;
>
> Efree = number_of_empty_freecells;
>
> mcnt = ( ( Efree + 1 ) << Ecolm );
>
> if ( move_to_empty_column ) mcnt = ( mcnt >> 1 );
>
That's indeed the correct formula. For people who are not very familiar with C, then
"<<" is the left shift operator and "a << b" is equivalent to "a * (2 ** b)" (where ** is
exponentiation) and ">>" is right shift and equivalent to "floor(a / (2 ** b))":
http://en.wikipedia.org/wiki/Logical_shift
Anyway, the code for this formula can be found in these files:
*
https://bitbucket.org/shlomif/fc-solve/src/4828523538d6/fc-solve/source/meta_move_funcs_helpers.h
*
https://bitbucket.org/shlomif/fc-solve/src/4828523538d6/Games-Solitaire-Verify/Games-Solitaire-Verify/lib/Games/Solitaire/Verify/State.pm
What my code does is expand such a sequence move to its individual card moves.
Regards,
Shlomi Fish
>
> The variable "mcnt" contains the maximal multi-card move count --
> depending on the destination being an occupied/empty column.
>
>
> --- In fc-solve-discuss_at_yahoogroups.com, Shlomi Fish <shlomif_at_...>
> wrote:
> >
> > I noticed that some people reported that they think some multi card
> > moves performed by Freecell Solver are illegal (or asked for help
> > with expanding them.).
>
>
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
What Makes Software Apps High Quality - http://shlom.in/sw-quality
Linux — Because Software Problems Should not Cost Money.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
Received on Sat Sep 01 2012 - 00:48:05 IDT