| Games-Risk documentation | view source | Contained in the Games-Risk distribution. |
Games::Risk::Player - risk player
version 3.103040
my $id = Games::Risk::Player->new(\%params);
This module implements a risk player, with all its characteristics.
The following accessors (acting as mutators, ie getters and setters) are
available for Games::Risk::Player objects:
the class of the artificial intelligence, if player is an ai.
player color to be used in the gui.
player name.
player type (human, ai, etc.)
The following methods are available for Games::Risk::Player objects:
Return the list of cards (Games::Risk::Card objects) currently
owned by $player.
Add $card to the set of cards owned by $player.
Remove $card from the set of cards owned by player.
Return the list of countries (Games::Risk::Country objects)
currently owned by $player.
Add $country to the set of countries owned by $player.
Delete $country from the set of countries owned by $player.
Break all circular references in $player, to prevent memory leaks.
Return an integer reflecting the greatness of $player. It will raise
with the number of owned territories, as well as the number of armies.
Jerome Quelin
This software is Copyright (c) 2008 by Jerome Quelin.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
| Games-Risk documentation | view source | Contained in the Games-Risk distribution. |