line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Game::Pexeso; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Game::Pexeso - Pexeso game in Clutter |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Play the pexeso game, a simple and educational mind game, with a Perl variant! |
10
|
|
|
|
|
|
|
In this version the cards are downloaded directly from the internet and are |
11
|
|
|
|
|
|
|
displaying your favourite CPAN contributor (a.k.a Perl hacker). |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 RULES |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
A deck of shuffled cards where each card appears twice is placed in front of you |
16
|
|
|
|
|
|
|
with the cards facing down so you can't see which card is where. The idea is to |
17
|
|
|
|
|
|
|
match the pairs of cards until there are no more cards available. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
At each turn you are allowed to flip two cards. If the two cards are identical |
20
|
|
|
|
|
|
|
then the pair is removed otherwise the card are flipped again so you can't see |
21
|
|
|
|
|
|
|
them. You are allowed to remember the cards positions once you have seen them, |
22
|
|
|
|
|
|
|
in fact that's the purpose of the game! You continue flipping pairs of cards |
23
|
|
|
|
|
|
|
until you have successfully matched all cards. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 AUTHORS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Emmanuel Rodriguez Epotyl@cpan.orgE. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Copyright (C) 2009 by Emmanuel Rodriguez. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
34
|
|
|
|
|
|
|
it under the same terms of: |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=over 4 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item the GNU Lesser General Public License, version 2.1; or |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item the Artistic License, version 2.0. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=back |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This module is distributed in the hope that it will be useful, |
45
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
46
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public |
49
|
|
|
|
|
|
|
License along with this module; if not, see L. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
For the terms of The Artistic License, see L. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
21271
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
56
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
# A true value |
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|