
Games::Risk::GUI::MoveArmies - window to move armies

my $id = Games::Risk::GUI::MoveArmies->spawn(%opts);
Poe::Kernel->post( $id, 'attack_move', $src, $dst, $min );
Poe::Kernel->post( $id, 'move_armies', $src, $dst, $max );

GR::GUI::MoveArmies implements a POE session, creating a Tk window to ask the number of armies to move between adjacent countries. Once used, the window is hidden to be reused later on.

Create a window requesting for amies move, 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:
Show window and request how many armies to move from $src to $dst. This number should be at least $min, matching the number of dices used for attack.


Jerome Quelin, <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+.