| Games-Risk documentation | view source | Contained in the Games-Risk distribution. |
Games::Risk - classical 'risk' board game
version 3.103040
use Games::Risk;
Games::Risk->new;
POE::Kernel->run;
exit;
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.
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
available for Games::Risk objects:
armies left to be placed.
the current Games::Risk::Map object of the game.
Put back all cards given to players to the deck.
Break all circular references in $game, to reclaim all objects
referenced.
Remove $player from the list of active players.
Return the next player to play, or undef if the turn is over. Of course, players that have lost will never be returned.
Return the Games::Risk::Player objects of the current game. Note that
some of those players may have already lost.
Return the list of active players (Games::Risk::Player objects).
Remove all players, and replace them by @players.
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.
Send $event (with @params) to all players.
Send $event (with @params) to one $player.
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 Games::Risk:
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 bug-games-risk at
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.
You can find more information on the classical risk game on wikipedia
at http://en.wikipedia.org/wiki/Risk_game.
You might also want to check jRisk, a java-based implementation of Risk, which inspired me quite a lot.
You can also look for information on this module at:
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
electronic copy.
Some ideas & artwork taken from project jrisk, available at
http://risk.sourceforge.net/. Others (ideas & artwork once again)
taken from teg, available at http://teg.sourceforge.net/
Jerome Quelin, <jquelin@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+.
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. |