NAME
Games::Risk::Player - risk player
VERSION
version 3.101430
SYNOPSIS
my $id = Games::Risk::Player->new(\%params);
DESCRIPTION
This module implements a risk player, with all its characteristics.
METHODS
Constructor
my $player = Games::Risk::Player->new( \%params )
Accessors
The following accessors (acting as mutators, ie getters and setters) are available for Games::Risk::Player objects:
ai_class
the class of the artificial intelligence, if player is an ai.
color
player color to be used in the gui.
name
player name.
type
player type (human, ai, etc.)
Object methods
The following methods are available for Games::Risk::Player objects:
- my @cards = $player->cards()
-
Return the list of cards (
Games::Risk::Cardobjects) currently owned by$player. - * $player->card_add( $card )
-
Add
$cardto the set of cards owned by$player. - * $player->card_del( $card )
-
Remove
$cardfrom the set of cards owned byplayer. - * my @countries = $player->countries()
-
Return the list of countries (
Games::Risk::Countryobjects) currently owned by$player. - * $player->country_add( $country )
-
Add
$countryto the set of countries owned by$player. - * $player->country_del( $country )
-
Delete
$countryfrom the set of countries owned by$player. - * $player->destroy()
-
Break all circular references in
$player, to prevent memory leaks. - * my $greatness = $player->greatness()
-
Return an integer reflecting the greatness of
$player. It will raise with the number of owned territories, as well as the number of armies.
SEE ALSO
AUTHOR
Jerome Quelin
COPYRIGHT AND LICENSE
This software is Copyright (c) 2008 by Jerome Quelin.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
7 POD Errors
The following errors were encountered while parsing the POD:
- Around line 246:
Expected text after =item, not a bullet
- Around line 250:
Expected text after =item, not a bullet
- Around line 254:
Expected text after =item, not a bullet
- Around line 259:
Expected text after =item, not a bullet
- Around line 263:
Expected text after =item, not a bullet
- Around line 267:
Expected text after =item, not a bullet
- Around line 271:
Expected text after =item, not a bullet