diff options
author | doy <doy@tozt.net> | 2008-12-18 03:50:25 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2008-12-18 03:50:25 -0500 |
commit | 61d19a2bd14d2f48e2086d845747d1f0094597b3 (patch) | |
tree | fa0fc4983dbea7abe9edbd3f8f948bc84fcbc75d /lib/Bot/Games/Game | |
parent | 1e43c81a11a69742d4c91c24c6168659741b8135 (diff) | |
download | bot-games-61d19a2bd14d2f48e2086d845747d1f0094597b3.tar.gz bot-games-61d19a2bd14d2f48e2086d845747d1f0094597b3.zip |
syntax errors
Diffstat (limited to 'lib/Bot/Games/Game')
-rw-r--r-- | lib/Bot/Games/Game/Ghostlike.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Bot/Games/Game/Ghostlike.pm b/lib/Bot/Games/Game/Ghostlike.pm index 210eba6..7c636be 100644 --- a/lib/Bot/Games/Game/Ghostlike.pm +++ b/lib/Bot/Games/Game/Ghostlike.pm @@ -39,14 +39,14 @@ has _wordlist => ( }, ); -around state => ( +around state => sub { my $orig = shift; my $self = shift; return $self->$orig unless @_; my ($state) = @_; $state = uc $state; return $self->$orig($state); -); +}; sub turn { my $self = shift; @@ -79,7 +79,7 @@ sub challenge { my $challenger = $self->has_challenger ? $self->challenger : $player; if ($word) { if (!$self->valid_word_from_state($word)) { - return "$word is not valid for state $state!"; + return "$word is not valid for state " . $self->state . "!"; } elsif ($self->_valid_word($word)) { $self->is_over("$word is a word! $challenger wins!"); @@ -106,7 +106,7 @@ sub previous_player { sub next_player { my $self = shift; return unless $self->_has_current_player; - return $self->players->[($self->_current_player_index + 1) % $self->num_players)]; + return $self->players->[($self->_current_player_index + 1) % $self->num_players]; } sub valid_move { 1 } |