blob: 83b38908cda6b92dd5f17eb83ee875bfbdfca22e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/usr/bin/perl
package Bot::Games::Game::Spook;
use Moose;
use Games::Word qw/is_subpermutation/;
extends 'Bot::Games::Game::Ghostlike';
has '+help' => (
default => "spook help",
);
sub valid_move {
my $self = shift;
my ($move) = @_;
return is_subpermutation($self->state, $move)
&& length($self->state) + 1 == length($move);
}
1;
|