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.1900
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

VERSION

25       version 0.1900
26

METHODS

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

AUTHOR

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

BUGS

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

SUPPORT

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