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


Games-Risk documentation  | view source Contained in the Games-Risk distribution.

Index


NAME

Top

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

VERSION

Top

version 3.103040

DESCRIPTION

Top

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.

SYNOPSYS

Top

    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 );

CLASS METHODS

Top

my $id = Games::Risk::GUI::MoveArmies->spawn( %opts );

Create a window requesting for amies move, and return the associated POE session ID. One can pass the following options:

parent => $mw

A Tk window that will be the parent of the toplevel window created. This parameter is mandatory.

PUBLIC EVENTS

Top

The newly created POE session accepts the following events:

attack_move( $src, $dst, $min )

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.

SEE ALSO

Top

Games::Risk.

AUTHOR

Top

  Jerome Quelin

COPYRIGHT AND LICENSE

Top


Games-Risk documentation  | view source Contained in the Games-Risk distribution.