The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Game::Pexeso::Card - A card is an actor with two faces.

SYNOPSIS

        my $card = Game::Pexeso::Card->new({
                front => $front_actor,
                back  => $back_actor,
        });

DESCRIPTION

Representation of a card. A card consists for two actors: back face and front face that act together as a single entity. A card can be flipped to show the front face or the back face.

METHODS

The following methods are available:

new

Creates a new card with the two given faces. The card is placed so that the back of the card is shown.

Usage:

        my $card = Game::Pexeso::Card->new({
                front => $front_actor,
                back  => $back_actor,
        });

flip

Flips the card with an animation in order to show the other side.

fade

Hides the card with an animation. This method is expected to be called for hidding matching pairs, therefore it will accept a timeline that can be shared by both cards.

AUTHORS

Emmanuel Rodriguez <potyl@cpan.org>.

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Emmanuel Rodriguez.

This library is free software; you can redistribute it and/or modify it under the same terms of:

the GNU Lesser General Public License, version 2.1; or
the Artistic License, version 2.0.

This module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You should have received a copy of the GNU Library General Public License along with this module; if not, see http://www.gnu.org/licenses/.

For the terms of The Artistic License, see perlartistic.