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


Game-Pexeso documentation  | view source Contained in the Game-Pexeso distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

DESCRIPTION

Top

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

Top

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

Top

Emmanuel Rodriguez <potyl@cpan.org>.

COPYRIGHT AND LICENSE

Top


Game-Pexeso documentation  | view source Contained in the Game-Pexeso distribution.