Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Games::Set 0.01

    Download button

    No screenshots available
    Downloads: 348  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.6/5)
    9 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Richard Clamp | More programs
    Perl Artistic License / FREE
    June 5th, 2008, 03:36 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Games::Set description

    Games::Set module contains the rules for the game of set.

    Games::Set module contains the rules for the game of set.

    SYNOPSIS

    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 ) ? "setn" : "no setn";

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

    METHODS

    new

    Class::Accessor inherited constructor, returns a new gamestate

    deck

    The current deck. A reference to an array containing many Games::Set::Card objects.

    shuffle

    Shuffle the current deck.

    deal

    Take a card from the top of the deck.

    standard_deck

    Calculates the standard deck as a list of Games::Set::Card objects.

    set( @cards )

    Returns true if the cards make a set.

    find_sets( @cards )

    returns all the possible sets within @cards as array references

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    game set | game rules | Perl module | game | set | rules

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM