NAME
Games::Risk::Player - risk player
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 @countries = $player->countries()
Return the list of countries (c>Games::Risk::Map::Country> objects) currently owned by
$player
.$player->country_add( $country )
Add
$country
to the set of countries owned by$player
.$player->country_del( $country )
Delete
$country
from the set of countries owned by$player
.
SEE ALSO
AUTHOR
Jerome Quelin, <jquelin at cpan.org>
COPYRIGHT & LICENSE
Copyright (c) 2008 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.