Games:...::Card(3pm)
π NAME π
okay so bestie, this page is Games:...::Card(3pm) β straight out of the User Contributed Perl Documentation β and it's literally just a class wrapper for one single, individual Solitaire card. one card. that's the whole vibe. she's a tiny queen and she contains multitudes β¨
πΈ VERSION πΈ
version 0.2601 β yes she's numbered, yes she's iconic
π SYNOPSIS π
here's the whole entrance, no notes:
use Games::Solitaire::Verify::Card;
# Initialise a Queen-of-Hearts
my $queen_of_hearts = Games::Solitaire::Verify::Card->new(
{
string => "QH",
id => 4,
data => { %DATA },
},
);
look at her. a Queen of Hearts. born to be constructed with a string, an id, and some data. main character energy fr fr π
β¨ METHODS β¨
every method, no skips, let's go π«Ά
π $class->get_suits_seq()
hands you back the expected sequence of the suits, and that sequence is "H", "S", "C", "D". that's it. that's the order. periodt.
π’ $class->calc_rank($rank_string)
does the math and gives you the numerical rank of whatever string you passed in as the argument.
Example:
my $ten = Games::Solitaire::Verify::Card->calc_rank("T")
# Prints 10.
print "$ten\n";
"T" in, 10 out. slay.
0οΈβ£ $class->calc_rank_with_0($rank_string)
same exact energy as calc_rank, except it also supports "0" as the zero'th card. lowkey inclusive of zero, we love that.
π $card->data()
arbitrary data that's associated with the card. can hold any scalar. anything. a string, a number, a reference, whatever your heart desires β no cap.
π $card->id()
a simple identifier that identifies the card. should be a string, bestie. keep it a string.
π $card->rank()
returns the rank of the card as an integer. so: Ace is 1, 2-10 are 2-10, J is 11, Q is 12, and K is 13. the whole monarchy accounted for π
β₯οΈ $card->suit()
returns "H", "C", "D" or "S" depending on the suit. pick your fighter.
π¨ $card->color()
returns "red" or "black" depending on the rank of the card.
π $card->color_for_suit($suit)
gets you the color of the suit $suit β and heads up, that suit might be different than the card's suit. so you can ask about a suit that isn't even hers. versatile.
π― my $copy = $card->clone();
clones the card into a new copy. two cards, zero drama, identical twins π¦
π $card->to_string()
converts the card to a string representation. the glow-up into text format.
β‘ $card->fast_s()
a cached string representation. > use with care. that's the actual warning, i'm not being dramatic, she said use with care and i'm passing the message along π
π€ $class->rank_to_string($rank_idx)
converts the rank to a string. reverse uno of the rank math.
π my [@ranks] = $class->get_ranks_strings()
returns an (effectively constant) array reference of rank strings.
( Added in version 0.17 .)
π $card->is_flipped()
determines if the card is flipped. face up or face down, we simply must know.
π $card->set_flipped($flipped_bool)
sets the card's flipped status. you hold the power, bestie.
π«Ά SUPPORT π«Ά
π Websites
the following websites have more information about this module, and may be of help to you. as always, in addition to those websites please use your favorite search engine to discover more resources. (yes, googling is valid, we stan a resourceful queen)
- MetaCPAN β a modern, open-source CPAN search engine, useful to view POD in HTML format. <https://metacpan.org/release/Games-Solitaire-Verify>
- RT: CPAN's Bug Tracker β the RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. <https://rt.cpan.org/Public/Dist/Display.html?Name=Games-Solitaire-Verify>
- CPANTS β the CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. <http://cpants.cpanauthors.org/dist/Games-Solitaire-Verify>
- CPAN Testers β the CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. <http://www.cpantesters.org/distro/G/Games-Solitaire-Verify>
- CPAN Testers Matrix β the CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. <http://matrix.cpantesters.org/?dist=Games-Solitaire-Verify>
- CPAN Testers Dependencies β the CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. <http://deps.cpantesters.org/?module=Games::Solitaire::Verify>
π Bugs / Feature Requests
please report any bugs or feature requests by email to bug-games-solitaire-verify at rt.cpan.org, or through the web interface at <https://rt.cpan.org/Public/Bug/Report.html?Queue=Games-Solitaire-Verify>. you will be automatically notified of any progress on the request by the system. auto-notifications? we love being kept in the loop π
π» Source Code
the code is open to the world, and available for you to hack on. please feel free to browse it and play with it, or whatever. if you want to contribute patches, please send me a diff or prod me to pull from your repository :)
<https://github.com/shlomif/fc-solve>
git clone git://github.com/shlomif/fc-solve.git
π AUTHOR π
Shlomi Fish <shlomif@cpan.org>
π BUGS π
please report any bugs or feature requests on the bugtracker website <https://github.com/shlomif/fc-solve/issues>
when submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. (a test file is the love language of a maintainer, fr fr, no cap, it's giving thoughtful π)
π COPYRIGHT AND LICENSE π
this software is Copyright (c) 2008 by Shlomi Fish.
this is free software, licensed under:
The MIT (X11) License
and that's the whole page, bestie π this was Games:...::Card(3pm) from the User Contributed Perl Documentation, living on perl v5.42.0, dated 2025-07-25. go forth and shuffle, you absolute icon ππ¦β¨
π¦ where this page comes from
- fedora 43: perl-Games-Solitaire-Verify 0.2601-3.fc43 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms