summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games/Game/Superghost.pm
blob: b286c93d5d9c7798e7fd686be25e8eb8eb25e0f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl
package Bot::Games::Game::Superghost;
use Moose;
extends 'Bot::Games::Game::Ghostlike';

has '+help' => (
    default => "superghost help",
);

sub valid_move {
    my $self = shift;
    my ($move) = @_;
    return uc(substr($move, 0, -1)) eq $self->state
        || uc(substr($move, 1))     eq $self->state;
}

__PACKAGE__->meta->make_immutable;
no Moose;

1;