Games::Risk::Continent - continent object
version 3.101511
my $id = Games::Risk::Continent->new(\%params);
This module implements a map continent, with all its characteristics.
my $player = Games::Risk::Continent->new( \%params )
Create a new continent. Mandatory params are id, name and bonus (see below in Accessors for a quick definition).
id
name
bonus
Accessors
The following accessors (acting as mutators, ie getters and setters) are available for Games::Risk::Continent objects:
Games::Risk::Continent
bonus()
number of bonus armies given when a player controls every country in the continent.
id()
unique id assigned to the continent.
name()
continent name.
$continent->add_country( $country )
Store $country (a Games::Risk::Country object) as a country located within the $continent.
$country
Games::Risk::Country
$continent
$continent->destroy()
Remove all circular references of $continent, to prevent memory leaks.
my @countries = $continent->countries()
Return the list of countries located in $continent.
my $p0wned = $continent->is_owned( $player )
Return true if $player is the owner of all $continent's countries.
$player
Games::Risk.
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
To install Games::Risk, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Risk
CPAN shell
perl -MCPAN -e shell install Games::Risk
For more information on module installation, please visit the detailed CPAN module installation guide.