Games::Mastermind::Cracker::Basic - guess arbitrary possible codes


Games-Mastermind-Cracker documentation Contained in the Games-Mastermind-Cracker distribution.

Index


Code Index:

NAME

Top

Games::Mastermind::Cracker::Basic - guess arbitrary possible codes


Games-Mastermind-Cracker documentation Contained in the Games-Mastermind-Cracker distribution.

package Games::Mastermind::Cracker::Basic;
use Moose;

extends 'Games::Mastermind::Cracker';
with 'Games::Mastermind::Cracker::Role::Elimination';

sub make_guess {
    my $self = shift;

    # reset iterator
    keys %{ $self->possibilities };

    # return an arbitrary possibility
    return scalar each %{ $self->possibilities };
}

sub result_of { }

1;

__END__