Games::Risk::GUI - gui multiplexer poe session
my $id = Games::Risk::GUI->spawn(\%params);
Games::Risk uses various windows to display the game: the board of course, but also the window displaying the cards owned by the player, and some others.
Games::Risk
Depending on the event, the controller needs to send events to a given window, or even to more than one. But it is clearly not the controller's job to know how the GUI works!
Therefore, Games::Risk::GUI is a poe session that will receive all the events fired by the controller, and forward them to the other windows. Of course, the controller now fires its events only to the Games::Risk::GUI session.
Games::Risk::GUI
This poe session will have various aliases: the player's name, the player object stringified, and finally the alias gui.
gui
This method will create a POE session responsible for multiplexing the events received from the controller to the various windows.
It will return the poe id of the session newly created.
You can tune the session by passing some arguments as a hash reference:
player => $player
The human $player that will control the GUI.
$player
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.