blob: 8aeabb27f586b3a10348cc6caf760e9c4b6f3f54 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/perl
package Bot::Games::Game::Xghost;
use Bot::Games::OO;
use Games::Word qw/is_substring/;
extends 'Bot::Games::Game::Ghostlike';
has '+help' => (
default => "xghost help",
);
sub valid_move {
my $self = shift;
my ($move) = @_;
return is_substring($self->state, uc($move))
&& length($self->state) + 1 == length($move);
}
__PACKAGE__->meta->make_immutable;
no Bot::Games::OO;
1;
|