summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-04-24 22:49:19 -0500
committerdoy <doy@tozt.net>2009-04-24 22:49:19 -0500
commitdcdc1e4ac2404fb90b9d5f3390614c5cc46b3e0f (patch)
treeef9da4505d37034f51ee188cd3df6793c1e0565b
parent14af2793f9bfec0833b7c07df5f7fa9d3f6b895b (diff)
downloadbot-games-dcdc1e4ac2404fb90b9d5f3390614c5cc46b3e0f.tar.gz
bot-games-dcdc1e4ac2404fb90b9d5f3390614c5cc46b3e0f.zip
temporary fix to allow canceling ghostlike games
-rw-r--r--lib/Bot/Games/Game/Ghostlike.pm6
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)) {