Games::Risk::Tk::Cards - cards listing
version 3.112410
GR::Tk::Cards implements a POE session, creating a Tk window to list the cards the player got. It can be used to exchange cards with new armies during reinforcement.
GR::Tk::Cards
$K->post( cards => 'card_add', $card );
Player just received a new $card, display it.
$card
$K->post( cards => 'card_del', @cards );
Player just exchanged some @cards, remove them.
@cards
$K->post( cards => 'attack' );
Prevent user to exchange armies.
$K->post( cards => 'place_armies' );
Change exchange button state depending on the cards selected.
$K->post( cards => 'shutdown', $destroy );
Kill current session. If $destroy is true, the toplevel window will also be destroyed.
$destroy
$K->post( 'gui-continents' => 'visibility_toggle' );
Request window to be hidden / shown depending on its previous state.
Games::Risk::Tk::Cards->new(%opts);
Create a window listing player cards, and return the associated POE session ID. One can pass the following options:
A Tk window that will be the parent of the toplevel window created. This parameter is mandatory.
The newly created POE session accepts the following events:
card_add( $card )
Add $card to the list of cards owned by the player to be shown.
card_del( $card )
Remove $card from the list of cards owned by the player to be shown.
visibility_toggle()
Games::Risk.
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
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.