1Games::Solitaire::VerifUys:e:rCaCrodn(t3r)ibuted Perl DoGcaummeesn:t:aStoilointaire::Verify::Card(3)
2
3
4

NAME

6       Games::Solitaire::Verify::Card - a class wrapper for an individual
7       Solitaire card.
8

VERSION

10       version 0.2202
11

SYNOPSIS

13           use Games::Solitaire::Verify::Card;
14
15           # Initialise a Queen-of-Hearts
16           my $queen_of_hearts = Games::Solitaire::Verify::Card->new(
17               {
18                   string => "QH",
19                   id => 4,
20                   data => { %DATA },
21               },
22           );
23

METHODS

25   $class->get_suits_seq()
26       Returns the expected sequence of the suits - "H", "S", "C", "D".
27
28   $class->calc_rank($rank_string)
29       Calculates the numerical rank of the string passed as argument.
30
31       Example:
32
33           my $ten = Games::Solitaire::Verify::Card->calc_rank("T")
34           # Prints 10.
35           print "$ten\n";
36
37   $class->calc_rank_with_0($rank_string)
38       Same as calc_rank only supporting "0" as the zero'th card.
39
40   $card->data()
41       Arbitrary data that is associated with the card. Can hold any scalar.
42
43   $card->id()
44       A simple identifier that identifies the card. Should be a string.
45
46   $card->rank()
47       Returns the rank of the card as an integer. Ace is 1, 2-10 are 2-10; J
48       is 11, Q is 12 and K is 13.
49
50   $card->suit()
51       Returns "H", "C", "D" or "S" depending on the suit.
52
53   $card->color()
54       Returns "red" or "black" depending on the rank of the card.
55
56   $card->color_for_suit($suit)
57       Get the color of the suit $suit (which may be different than the card's
58       suit).
59
60   my $copy = $card->clone();
61       Clones the card into a new copy.
62
63   $card->to_string()
64       Converts the card to a string representation.
65
66   $card->fast_s()
67       A cached string representation. (Use with care).
68
69   $class->rank_to_string($rank_idx)
70       Converts the rank to a string.
71
72   my [@ranks] = $class->get_ranks_strings()
73       Returns an (effectively constant) array reference of rank strings.
74
75       ( Added in version 0.17 .)
76
77   $card->is_flipped()
78       Determines if the card is flipped.
79
80   $card->set_flipped($flipped_bool)
81       Sets the cardXs flipped status.
82

AUTHOR

84       Shlomi Fish <shlomif@cpan.org>
85
87       This software is Copyright (c) 2014 by Shlomi Fish.
88
89       This is free software, licensed under:
90
91         The MIT (X11) License
92

BUGS

94       Please report any bugs or feature requests on the bugtracker website
95       <https://github.com/shlomif/fc-solve/issues>
96
97       When submitting a bug or request, please include a test-file or a patch
98       to an existing test-file that illustrates the bug or desired feature.
99

SUPPORT

101   Perldoc
102       You can find documentation for this module with the perldoc command.
103
104         perldoc Games::Solitaire::Verify::Card
105
106   Websites
107       The following websites have more information about this module, and may
108       be of help to you. As always, in addition to those websites please use
109       your favorite search engine to discover more resources.
110
111       ·   MetaCPAN
112
113           A modern, open-source CPAN search engine, useful to view POD in
114           HTML format.
115
116           <https://metacpan.org/release/Games-Solitaire-Verify>
117
118       ·   Search CPAN
119
120           The default CPAN search engine, useful to view POD in HTML format.
121
122           <http://search.cpan.org/dist/Games-Solitaire-Verify>
123
124       ·   RT: CPAN's Bug Tracker
125
126           The RT ( Request Tracker ) website is the default bug/issue
127           tracking system for CPAN.
128
129           <https://rt.cpan.org/Public/Dist/Display.html?Name=Games-Solitaire-Verify>
130
131       ·   AnnoCPAN
132
133           The AnnoCPAN is a website that allows community annotations of Perl
134           module documentation.
135
136           <http://annocpan.org/dist/Games-Solitaire-Verify>
137
138       ·   CPAN Ratings
139
140           The CPAN Ratings is a website that allows community ratings and
141           reviews of Perl modules.
142
143           <http://cpanratings.perl.org/d/Games-Solitaire-Verify>
144
145       ·   CPANTS
146
147           The CPANTS is a website that analyzes the Kwalitee ( code metrics )
148           of a distribution.
149
150           <http://cpants.cpanauthors.org/dist/Games-Solitaire-Verify>
151
152       ·   CPAN Testers
153
154           The CPAN Testers is a network of smoke testers who run automated
155           tests on uploaded CPAN distributions.
156
157           <http://www.cpantesters.org/distro/G/Games-Solitaire-Verify>
158
159       ·   CPAN Testers Matrix
160
161           The CPAN Testers Matrix is a website that provides a visual
162           overview of the test results for a distribution on various
163           Perls/platforms.
164
165           <http://matrix.cpantesters.org/?dist=Games-Solitaire-Verify>
166
167       ·   CPAN Testers Dependencies
168
169           The CPAN Testers Dependencies is a website that shows a chart of
170           the test results of all dependencies for a distribution.
171
172           <http://deps.cpantesters.org/?module=Games::Solitaire::Verify>
173
174   Bugs / Feature Requests
175       Please report any bugs or feature requests by email to
176       "bug-games-solitaire-verify at rt.cpan.org", or through the web
177       interface at
178       <https://rt.cpan.org/Public/Bug/Report.html?Queue=Games-Solitaire-Verify>.
179       You will be automatically notified of any progress on the request by
180       the system.
181
182   Source Code
183       The code is open to the world, and available for you to hack on. Please
184       feel free to browse it and play with it, or whatever. If you want to
185       contribute patches, please send me a diff or prod me to pull from your
186       repository :)
187
188       <https://github.com/shlomif/fc-solve>
189
190         git clone git://github.com/shlomif/fc-solve.git
191
192
193
194perl v5.30.1                      2020-01-30 Games::Solitaire::Verify::Card(3)
Impressum