
Games::Set - The rules for the game of Set

my $game = Games::Set->new({ deck => [ Games::Set->standard_deck ] });
$game->shuffle;
my @cards = map { $game->deal } 1..3; # give me 3 cards
print $game->set( @cards ) ? "set\n" : "no set\n";

Games::Set understands some of the rules of the card game Set. It also knows how to generate a standard deck.

Class::Accessor inherited constructor, returns a new gamestate
The current deck. A reference to an array containing many Games::Set::Card objects.
Shuffle the current deck.
Take a card from the top of the deck.
Calculates the standard deck as a list of Games::Set::Card objects.
Returns true if the cards make a set.
returns all the possible sets within @cards as array references

None currently known. If you find any please make use of http://rt.cpan.org by mailing your report to bug-Games-Set@rt.cpan.org, or contact me directly.

Richard Clamp <richardc@unixbeard.net>
Rules of Set by Set Enterprises. http://setgame.com/

Copyright (C) 2003 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

http://setgame.com, purveyors of Set
http://set.omino.com David Van Brink's site detailling some of the maths involved