Games::Risk::Map::Continent - map continent
my $id = Games::Risk::Map::Continent->new(\%params);
This module implements a map continent, with all its characteristics.
my $player = Games::Risk::Map::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::Map::Continent objects:
Games::Risk::Map::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::Map::Country object) as a country located within the $continent.
$country
Games::Risk::Map::Country
$continent
my @countries = $continent->countries()
Return the list of countries located in $continent.
Games::Risk.
Jerome Quelin, <jquelin at cpan.org>
<jquelin at cpan.org>
Copyright (c) 2008 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU GPLv3+.
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.