NAME

Game::Cribbage::Play::Card - a card as it appears within a play sequence

VERSION

Version 0.12

SYNOPSIS

use Game::Cribbage::Play::Card;

my $play_card = Game::Cribbage::Play::Card->new(
	player => 'player1',
	card   => $deck_card,
);

print $play_card->value;   # delegates to the wrapped Deck::Card
print $play_card->symbol;  # delegates to the wrapped Deck::Card

DESCRIPTION

Wraps a Game::Cribbage::Deck::Card together with the identity of the player who played it, so that a Game::Cribbage::Play object can track the ordered sequence of played cards alongside their owners.

PROPERTIES

player

Readonly object or string identifying the player who played this card.

$play_card->player;

card

Readonly Game::Cribbage::Deck::Card object that this play-card wraps.

$play_card->card;

FUNCTIONS

value

Delegates to the wrapped card's value method, returning the pip value used for totalling the running count (A=1, 2-10 face value, J/Q/K=10).

$play_card->value;

symbol

Delegates to the wrapped card's symbol method, returning the card symbol string (e.g. 'A', '7', 'K').

$play_card->symbol;

AUTHOR

LNATION, <email at lnation.org>

BUGS

Please report any bugs or feature requests to bug-game-cribbage at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Game-Cribbage. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Game::Cribbage

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2024 by LNATION.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)