Games::Risk - classical 'risk' board game
Risk is a strategic turn-based board game. Players control armies, with
which they attempt to capture territories from other players. The goal
of the game is to control all the territories (
conquer the world)
through the elimination of the other players. Using area movement, Risk
ignores realistic limitations, such as the vast size of the world, and
the logistics of long campaigns.
This distribution implements a graphical interface for this game.
Games::Risk itself tracks everything needed for a risk game. It is
also used as a heap for
Games::Risk::Controller POE session.
Start the application, with an initial batch of
@modules to build.
my @modules = Games::Risk->maps;
Return a list of module names under Games::Risk::Map namespace.
my $game = Games::Risk->new
Create a new risk game. No params needed. Note: this class implements a singleton scheme.
The following accessors (acting as mutators, ie getters and setters) are
armies left to be placed.
Games::Risk::Mapobject of the game.
Put back all cards given to players to the deck.
Break all circular references in
$game, to reclaim all objects referenced.
$game->player_lost( $player )
Remove $player from the list of active players.
my $player = $game->player_next()
Return the next player to play, or undef if the turn is over. Of course, players that have lost will never be returned.
my @players = $game->players()
Games::Risk::Playerobjects of the current game. Note that some of those players may have already lost.
my @players = $game->players_active;
Return the list of active players (Games::Risk::Player objects).
$game->players_reset( @players )
Remove all players, and replace them by
Mark all players to be in "turn to do", effectively marking them as still in play. Typically called during initial army placing, or real game start.
@params) to all players.
$game->send_to_one($player, $event, @params)
@params) to one
This is a work in progress. While there are steady improvements, here's
a rough list (with no order implied whatsoever) of what you can expect
in the future for
- screen to customize the new game to be played - DONE - 1.1.0
- config save / restore
- saving / loading game
- network play
- maps theming
- i18n - DONE - 3.101370: gui, 3.112590: maps
- better ais - DONE - 0.5.0: blitzkrieg ai, 0.5.1: hegemon ai
- country cards - DONE - 0.6.0
- continents bonus - DONE - 0.3.3
- continents bonus localized
- prettier map coloring
- remove all the FIXMEs in the code :-)
- do-or-die mode (slanning's request) - DONE - 1.1.2
- "attack trip" planning (slanning's request)
However, the game is already totally playable by now: reinforcements, continent bonus, country cards, different artificial intelligences... Therefore, version 1.0.0 has been released with those basic requirements. Except new features soon!
Please report any bugs or feature requests to
rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-Risk. I will be
notified, and then you'll automatically be notified of progress on your
bug as I make changes.
I definitely recommend you to buy a
risk board game and play with
friends, you'll have an exciting time - much more than with this poor
You can find more information on the classical
risk game on wikipedia
You can find more information on this module at:
See open / report bugs
AnnoCPAN: Annotated CPAN documentation
COPYRIGHT AND LICENSE
This software is Copyright (c) 2008 by Jerome Quelin.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007