chromatic > Games-PMM-0.10 > Games::PMM::Actions

Download:
Games-PMM-0.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Games::PMM::Actions - actions for Games::PMM

SYNOPSIS ^

        use Games::PMM::Actions;

        my $actions = Games::PMM::Actions->new();

        # create $arena
        # create and command @monsters

        for my $monster (@monsters)
        {
                while (my ($command, @args) = $monster->next_command())
                {
                        next unless $actions->can( $command );
                        $actions->$command( $arena, $monster, @args );
                }
        }

DESCRIPTION ^

Games::PMM::Action contains all of the glue code to dispatch commands to the appropriate actor in Games::PMM. Since some actions affect only Monsters and others affect the Arena, this class divides the responsibilities between them.

METHODS ^

All methods that correspond to actions are prefixed with the phrase action_. This may change in a future version.

AUTHOR ^

chromatic, chromatic@wgz.org

BUGS ^

No known bugs.

COPYRIGHT ^

Copyright (c) 2003, chromatic. All rights reserved. This module is distributed under the same terms as Perl itself, in the hope that it is useful but certainly under no guarantee.