diff options
author | doy <doy@tozt.net> | 2009-04-24 22:49:19 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-04-24 22:49:19 -0500 |
commit | dcdc1e4ac2404fb90b9d5f3390614c5cc46b3e0f (patch) | |
tree | ef9da4505d37034f51ee188cd3df6793c1e0565b | |
parent | 14af2793f9bfec0833b7c07df5f7fa9d3f6b895b (diff) | |
download | bot-games-dcdc1e4ac2404fb90b9d5f3390614c5cc46b3e0f.tar.gz bot-games-dcdc1e4ac2404fb90b9d5f3390614c5cc46b3e0f.zip |
temporary fix to allow canceling ghostlike games
-rw-r--r-- | lib/Bot/Games/Game/Ghostlike.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Bot/Games/Game/Ghostlike.pm b/lib/Bot/Games/Game/Ghostlike.pm index a025eb2..fc6229a 100644 --- a/lib/Bot/Games/Game/Ghostlike.pm +++ b/lib/Bot/Games/Game/Ghostlike.pm @@ -121,6 +121,12 @@ command valid_word_from_state => sub { return uc($word) eq $self->state; }; +command give_up => sub { + my $self = shift; + $self->is_over(1); + return "Game over!"; +}; + sub current_player_index { my $self = shift; for (0..($self->num_players - 1)) { |