diff options
Diffstat (limited to 'lib/Bot/Games/Game')
-rw-r--r-- | lib/Bot/Games/Game/24.pm | 6 | ||||
-rw-r--r-- | lib/Bot/Games/Game/Chess.pm | 8 | ||||
-rw-r--r-- | lib/Bot/Games/Game/Ghost.pm | 6 | ||||
-rw-r--r-- | lib/Bot/Games/Game/Role/CurrentPlayer.pm | 4 | ||||
-rw-r--r-- | lib/Bot/Games/Game/Spook.pm | 4 | ||||
-rw-r--r-- | lib/Bot/Games/Game/Superghost.pm | 4 | ||||
-rw-r--r-- | lib/Bot/Games/Game/Xghost.pm | 4 |
7 files changed, 18 insertions, 18 deletions
diff --git a/lib/Bot/Games/Game/24.pm b/lib/Bot/Games/Game/24.pm index a353900..dd072c4 100644 --- a/lib/Bot/Games/Game/24.pm +++ b/lib/Bot/Games/Game/24.pm @@ -1,5 +1,5 @@ package Bot::Games::Game::24; -use Bot::Games::OO::Game; +use Bot::Games::OO; extends 'Bot::Games::Game'; use List::Util qw/shuffle/; @@ -28,7 +28,7 @@ sub init { return $self->generate_24; } -augment turn => sub { +sub turn { my $self = shift; my ($player, $expr) = @_; $self->add_player($player) unless $self->has_player($player); @@ -101,6 +101,6 @@ sub evaluate { } __PACKAGE__->meta->make_immutable; -no Bot::Games::OO::Game; +no Bot::Games::OO; 1; diff --git a/lib/Bot/Games/Game/Chess.pm b/lib/Bot/Games/Game/Chess.pm index 554fe9e..c3eb14f 100644 --- a/lib/Bot/Games/Game/Chess.pm +++ b/lib/Bot/Games/Game/Chess.pm @@ -1,5 +1,5 @@ package Bot::Games::Game::Chess; -use Bot::Games::OO::Game; +use Bot::Games::OO; extends 'Bot::Games::Game'; with 'Bot::Games::Game::Role::CurrentPlayer'; @@ -17,7 +17,7 @@ has game => ( ); has turn_count => ( - traits => ['Counter'], + traits => ['MooseX::AttributeHelpers::Trait::Counter'], is => 'ro', isa => 'Int', default => 1, @@ -26,7 +26,7 @@ has turn_count => ( } ); -augment turn => sub { +sub turn { my $self = shift; my ($player, $move) = @_; $self->maybe_add_player($player); @@ -91,6 +91,6 @@ sub format_turn { } __PACKAGE__->meta->make_immutable; -no Bot::Games::OO::Game; +no Bot::Games::OO; 1; diff --git a/lib/Bot/Games/Game/Ghost.pm b/lib/Bot/Games/Game/Ghost.pm index 6f8ad83..97dbbb9 100644 --- a/lib/Bot/Games/Game/Ghost.pm +++ b/lib/Bot/Games/Game/Ghost.pm @@ -1,5 +1,5 @@ package Bot::Games::Game::Ghost; -use Bot::Games::OO::Game; +use Bot::Games::OO; use Games::Word::Wordlist; extends 'Bot::Games::Game'; with 'Bot::Games::Game::Role::CurrentPlayer'; @@ -41,7 +41,7 @@ around state => sub { return $self->$orig($state); }; -augment turn => sub { +sub turn { my $self = shift; my ($player, $state) = @_; $self->maybe_add_player($player); @@ -126,6 +126,6 @@ around maybe_add_player => sub { }; __PACKAGE__->meta->make_immutable; -no Bot::Games::OO::Game; +no Bot::Games::OO; 1; diff --git a/lib/Bot/Games/Game/Role/CurrentPlayer.pm b/lib/Bot/Games/Game/Role/CurrentPlayer.pm index 2dbe524..1479ef8 100644 --- a/lib/Bot/Games/Game/Role/CurrentPlayer.pm +++ b/lib/Bot/Games/Game/Role/CurrentPlayer.pm @@ -1,5 +1,5 @@ package Bot::Games::Game::Role::CurrentPlayer; -use Bot::Games::OO::Game::Role; +use Bot::Games::OO::Role; requires 'players', 'num_players', 'add_player'; @@ -40,6 +40,6 @@ sub maybe_add_player { } } -no Bot::Games::OO::Game::Role; +no Bot::Games::OO::Role; 1; diff --git a/lib/Bot/Games/Game/Spook.pm b/lib/Bot/Games/Game/Spook.pm index cfb577f..7cecca0 100644 --- a/lib/Bot/Games/Game/Spook.pm +++ b/lib/Bot/Games/Game/Spook.pm @@ -1,5 +1,5 @@ package Bot::Games::Game::Spook; -use Bot::Games::OO::Game; +use Bot::Games::OO; use Games::Word qw/is_subpermutation/; extends 'Bot::Games::Game::Ghost'; @@ -23,6 +23,6 @@ command valid_word_from_state => sub { }, formatter => 'Bool'; __PACKAGE__->meta->make_immutable; -no Bot::Games::OO::Game; +no Bot::Games::OO; 1; diff --git a/lib/Bot/Games/Game/Superghost.pm b/lib/Bot/Games/Game/Superghost.pm index f286425..3cc593e 100644 --- a/lib/Bot/Games/Game/Superghost.pm +++ b/lib/Bot/Games/Game/Superghost.pm @@ -1,5 +1,5 @@ package Bot::Games::Game::Superghost; -use Bot::Games::OO::Game; +use Bot::Games::OO; extends 'Bot::Games::Game::Ghost'; has '+help' => ( @@ -21,6 +21,6 @@ command valid_word_from_state => sub { }, formatter => 'Bool'; __PACKAGE__->meta->make_immutable; -no Bot::Games::OO::Game; +no Bot::Games::OO; 1; diff --git a/lib/Bot/Games/Game/Xghost.pm b/lib/Bot/Games/Game/Xghost.pm index 6973ab4..799d7ce 100644 --- a/lib/Bot/Games/Game/Xghost.pm +++ b/lib/Bot/Games/Game/Xghost.pm @@ -1,5 +1,5 @@ package Bot::Games::Game::Xghost; -use Bot::Games::OO::Game; +use Bot::Games::OO; use Games::Word qw/is_substring/; extends 'Bot::Games::Game::Ghost'; @@ -21,6 +21,6 @@ command valid_word_from_state => sub { }, formatter => 'Bool'; __PACKAGE__->meta->make_immutable; -no Bot::Games::OO::Game; +no Bot::Games::OO; 1; |