summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)) {