Volity::WinnersList

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

Winnerslist - Volitywinnerslist - Game - Slot - Position - Seat - Seats - Winners - Libraries - Programming

Published By:Jason McIntosh

License Type:Freeware

Date Added:25 October, 2010

Version:0.6.5

Price:Free

Downloads:81

Size:102.4 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

brisk is an implementation of the Briscola in 5 card game that uses Ajax technology. Whats New in This Release: &middot; Internet Explorer 6 and 7 compatibility. &middot; A shared decision to exit a game. &middot; Sound advice.

DateOct 30, 2010

Authorbrisk Team

Size89.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Games

VBA Express is a frontend for the very popular game emulator VisualBoyAdvance. Whats VBA Express? Its First, to configure VisualBoyAdvance (emulator)... EASILY! Graphics, sound, controls (keyboard and joystick), paths (to saves and captures)...

DateOct 22, 2010

AuthorAchraf cherti

Size1.3 MB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Utilities

Spectalum project is an engine for the CRPG Eye of the Beholder II. Spectalum is a reverse engineered Open Source game engine for the 1991 CRPG Eye of the Beholder II: The Legend of Darkmoon originally developed by Westwood Associates.

DateSep 6, 2010

AuthorAxel Friedrich

Size573.4 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Games

Moagg combines several game types of other genres like races, search & rescue, seek & destroy et cetera into a 2D gravity game. You are pilot of a small space ship and have to navigate that ship through different levels.

DateAug 30, 2010

AuthorBernhard Trummer and Andreas Granig

Size409.6 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Games

Ice Hockey Manager project is a hockey franchise management and simulation game. Ice Hockey Manager (IHM) is a hockey franchise management and simulation game.

DateAug 15, 2010

AuthorBernhard von Gunten

Size0

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Games