Main > Programming > Libraries >

Volity::WinnersList 0.6.5

Volity::WinnersList 0.6.5

Sponsored Links

Volity::WinnersList 0.6.5 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.10 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1022
Date added: 2007-01-05
Publisher: Jason McIntosh

Volity::WinnersList 0.6.5 description

Volity::WinnersList is Perl class for Volity game record winners lists.

SYNOPSIS

Heres code you might see in a Volity::Game subclass implementing a game where there is one winner and a bunch of losers, the latter of whom are all effectively tied for second place (we assume that the methods called in the first two lines are defined elsewhere):

if ($self->game_has_been_won) {
my ($winner, @losers) = $self->get_winning_seat_order;
$self->winners->add_seat_to_slot($winner, 1);
$self->winners->add_seat_to_slot(@losers, 2);
$self->end;
}

And heres what you might see in a subclass defining a score-using games where each player has a discrete ordinal place, and ties and ties are not possible (again assuming the presence of some magic methods defined somewhere else in the subclass):

if ($self->game_has_been_won) {
my @ordered_seats = $self->get_winning_seat_order;
for (my $index = 0; $index <= $#ordered_seats; $index++) {
my $place = $index + 1;
$self->winners->add_seat_to_slot($ordered_seats[$index], $place);
}
$self->end;
}

Attached to every Volity::Game-subclass object is a WinnersList object, accessible through the game objects winners method. When a game wraps up, it should use the methods listed in this document to place the tables seats in a winning order before calling the end method. The referee will then use this information when it builds the game record to send to the Volity bookkeeper.

METHODS

slots

Accessor to the raw list of winner slots. Returns an array of anonymous arrays, each representing a single slot, in winning order: the one at index [0] is the winningest slot, and the one at [-1] is the losingest. Each of these slot-arrays contains a number of Volity::Seat objects.

add_seat_to_slot ($seat, $position)

Adds the given seat to the winners list at the given position. Note that the position is expressed in game-rank, so the first-place position is 1, not 0.

If there are already seats at the current position, the given seat will share the slot with them. As a shortcut, you can add several seats at once to the same slot by passing an arrayref of seats as the first argument.

seats_at_slot ($position)

Returns the list of seats the given position in the winners list. Note that the position is expressed in game-rank, so the first-place position is 1, not 0.

Volity::WinnersList 0.6.5 Screenshot

Advertisements

Volity::WinnersList 0.6.5 Keywords

Bookmark Volity::WinnersList 0.6.5

Hyperlink code:
Link for forum:

Volity::WinnersList 0.6.5 Copyright

WareSeeker periodically updates pricing and software information of Volity::WinnersList 0.6.5 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Volity::WinnersList 0.6.5 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Volity::Seat is a Volity seat, containing some players. Free Download
Volity::Player is a Perl module for Volity players, from a referees perspective. Free Download
Volity::Jabber is a base class for Jabber-speaking Volity objects. Free Download
Volity::Game is a base class for Volity game modules. Free Download
oxine is a purely OSD-based xine frontend. Free Download
LinNeighborhood is free software for browsing M$ machines and mounting SMB filesystems. Free Download
Hover is a WordPress plugin that replaces keywords with links and an optional popup. Free Download
Online Cardgame System project is a client-server system for playing card games over the net. Free Download