NAME
Games::Risk::Map::Continent - map continent
SYNOPSIS
my $id = Games::Risk::Map::Continent->new(\%params);
DESCRIPTION
This module implements a map continent, with all its characteristics.
METHODS
Constructor
my $player = Games::Risk::Map::Continent->new( \%params )
Create a new continent. Mandatory params are
id,nameandbonus(see below inAccessorsfor a quick definition).
Accessors
The following accessors (acting as mutators, ie getters and setters) are available for Games::Risk::Map::Continent objects:
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.
Public methods
$continent->add_country( $country )
Store
$country(aGames::Risk::Map::Countryobject) as a country located within the$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
$playeris the owner of all$continent's countries.
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 terms of the GNU GPLv3+.