| Games-Solitaire-Verify documentation | Contained in the Games-Solitaire-Verify distribution. |
Games::Solitaire::Verify::VariantsMap - a mapping from the variants to their parameters.
Version 0.03
Returns the variants map - a hash reference mapping the variant ID to its parameters.
Returns the variant from its ID or undef if it does not exist.
This is a list of the available variant IDs.
Shlomi Fish, <shlomif at iglu.org.il>
Please report any bugs or feature requests to bug-games-solitaire-verifysolution-move at rt.cpan.org, or through
the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-Solitaire-Verify. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Games::Solitaire::Verify::VariantsMap
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-Solitaire-Verify
Copyright 2008 Shlomi Fish.
This program is released under the following license: MIT/X11 ( http://www.opensource.org/licenses/mit-license.php ).
| Games-Solitaire-Verify documentation | Contained in the Games-Solitaire-Verify distribution. |
package Games::Solitaire::Verify::VariantsMap; use strict; use warnings; require Games::Solitaire::Verify::VariantParams; use base 'Games::Solitaire::Verify::Base';
our $VERSION = '0.0901'; sub _init { return 0; } my %variants_map = ( "bakers_dozen" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 13, 'num_freecells' => 0, 'sequence_move' => "limited", 'seq_build_by' => "rank", 'empty_stacks_filled_by' => "none", } ), "bakers_game" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 8, 'num_freecells' => 4, 'sequence_move' => "limited", 'seq_build_by' => "suit", 'empty_stacks_filled_by' => "any", } ), "beleaguered_castle" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 8, 'num_freecells' => 0, 'sequence_move' => "limited", 'seq_build_by' => "rank", 'empty_stacks_filled_by' => "any", } ), "cruel" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 12, 'num_freecells' => 0, 'sequence_move' => "limited", 'seq_build_by' => "suit", 'empty_stacks_filled_by' => "none", } ), "der_katzenschwanz" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 2, 'num_columns' => 9, 'num_freecells' => 8, 'sequence_move' => "unlimited", 'seq_build_by' => "alt_color", 'empty_stacks_filled_by' => "none", } ), "die_schlange" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 2, 'num_columns' => 9, 'num_freecells' => 8, 'sequence_move' => "limited", 'seq_build_by' => "alt_color", 'empty_stacks_filled_by' => "none", } ), "eight_off" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 8, 'num_freecells' => 8, 'sequence_move' => "limited", 'seq_build_by' => "suit", 'empty_stacks_filled_by' => "kings", } ), "fan" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 18, 'num_freecells' => 0, 'sequence_move' => "limited", 'seq_build_by' => "suit", 'empty_stacks_filled_by' => "kings", } ), "forecell" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 8, 'num_freecells' => 4, 'sequence_move' => "limited", 'seq_build_by' => "alt_color", 'empty_stacks_filled_by' => "kings", } ), "freecell" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 8, 'num_freecells' => 4, 'sequence_move' => "limited", 'seq_build_by' => "alt_color", 'empty_stacks_filled_by' => "any", } ), "good_measure" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 10, 'num_freecells' => 0, 'sequence_move' => "limited", 'seq_build_by' => "rank", 'empty_stacks_filled_by' => "none", } ), "kings_only_bakers_game" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 8, 'num_freecells' => 4, 'sequence_move' => "limited", 'seq_build_by' => "suit", 'empty_stacks_filled_by' => "kings", } ), "relaxed_freecell" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 8, 'num_freecells' => 4, 'sequence_move' => "unlimited", 'seq_build_by' => "alt_color", 'empty_stacks_filled_by' => "any", } ), "relaxed_seahaven_towers" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 10, 'num_freecells' => 4, 'sequence_move' => "unlimited", 'seq_build_by' => "suit", 'empty_stacks_filled_by' => "kings", } ), "seahaven_towers" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 10, 'num_freecells' => 4, 'sequence_move' => "limited", 'seq_build_by' => "suit", 'empty_stacks_filled_by' => "kings", } ), "simple_simon" => Games::Solitaire::Verify::VariantParams->new( { 'num_decks' => 1, 'num_columns' => 10, 'num_freecells' => 0, 'sequence_move' => "limited", 'seq_build_by' => "suit", 'empty_stacks_filled_by' => "any", 'rules' => "simple_simon", } ), );
sub calc_variants_map { my $self = shift; return \%variants_map; }
sub get_variant_by_id { my $self = shift; my $id = shift; my $map = $self->calc_variants_map(); if (!exists($map->{$id})) { return; } else { return $map->{$id}->clone(); } }
1;