Games:...lution(3pm)

πŸ“¦
version 0.2601 Β· 2 versions
, in fedora 43

✨ Games::Solitaire::Verify::Solution β€” the vibe πŸ’…

okay so bestie, this is a Perl module from the Games::Solitaire::Verify fam (it lives in the 3pm manual section, iykyk) and it does exactly one iconic thing: it verifies an entire solution of Freecell Solver β€” or of any solver that's built similar. That's the whole gig. Verification queen πŸ‘‘


🌸 VERSION 🌸

version 0.2601 β€” she's current, she's fresh, no cap.


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole flow, copy it, love it, run it:

use Games::Solitaire::Verify::Solution;

my $input_filename = "freecell-24-solution.txt";

open (my $input_fh, "<", $input_filename)
    or die "Cannot open file $!";

# Initialise a column
my $solution = Games::Solitaire::Verify::Solution->new(
    {
        input_fh => $input_fh,
        variant => "freecell",
    },
);

my $ret = $solution->verify();

close($input_fh);

if ($ret)
{
    die $ret;
}
else
{
    print "Solution is OK";
}

see how it opens the file, builds the verifier, calls verify(), closes the file, and then either dies with whatever $ret is or prints Solution is OK? that's the entire emotional arc of this module πŸ’–


πŸ¦‹ METHODS πŸ¦‹

Games::Solitaire::Verify::Solution->new({variant => $variant, input_fh => $input_fh})

Constructs a brand new solution verifier, periodt. You hand it:

  • the variant β€” $variant β€” and heads up, you can peep Games::Solitaire::Verify::VariantsMap for the deets on those
  • the input file handle β€” $input_fh

and she's ready to go 🫢

✨ special case alert: if $variant is "custom", then the constructor also requires a 'variant_params' key, and that key should be a populated Games::Solitaire::Verify::VariantParams object. no params, no party.

you can also pass a numeric 'max_rank' argument to make it lower than 13 β€” that's new in 0.1900, so if you're on something ancient, that's why it's acting up 😭

$solution->verify()

Traverse the solution verifying it. that's it, that's the method β€” she walks the whole thing and checks it, main character energy 🌟


πŸ’œ SUPPORT πŸ’œ

Websites

these are the sites with more info about this module, and they may genuinely help you out. and obviously, on top of these, go off with your favorite search engine and find more resources β€” the internet is vast, bestie 🌈

Bugs / Feature Requests πŸ›

got a bug? got a feature request? pls pls pls report it β€” by email to "bug-games-solitaire-verify at rt.cpan.org", or through the web interface at <https://rt.cpan.org/Public/Bug/Report.html?Queue=Games-Solitaire-Verify>. and the best part? you'll be automatically notified of any progress on the request by the system. obsessed, honestly ✨

Source Code πŸ’»

the code is open to the world and available for you to hack on β€” please feel free to browse it and play with it, or whatever. and if you want to contribute patches, send a diff or prod the author to pull from the repository :)

<https://github.com/shlomif/fc-solve>

git clone git://github.com/shlomif/fc-solve.git

πŸ‘‘ AUTHOR πŸ‘‘

Shlomi Fish <shlomif@cpan.org> β€” the legend behind all of this πŸ’–


πŸ’€ BUGS πŸ’€

please report any bugs or feature requests on the bugtracker website <https://github.com/shlomif/fc-solve/issues>

and when you submit a bug or a request, please include a test-file β€” or a patch to an existing test-file β€” that illustrates the bug or the desired feature. fr fr, it helps so much πŸ™


This software is Copyright (c) 2008 by Shlomi Fish.

This is free software, licensed under:

The MIT (X11) License

and that's the whole page, bestie β€” documented by perl v5.42.0 on 2025-07-25, so go forth and verify some solutions, you absolute icon πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from