=encoding utf-8

=head1 NAME

App::Greple::wordle - wordle module for greple

=head1 SYNOPSIS

greple -Mwordle

=head1 DESCRIPTION

App::Greple::wordle is a greple module which implements wordle game.
Correctness is checked by regular expression.

Rule is almost same as the original game but answer is different.  Use
B<--compat> option to get compatible answer.

=begin html

<p><img width="750" src="https://raw.githubusercontent.com/kaz-utashiro/greple-wordle/main/images/screen-5.png">

=end html

=head1 OPTIONS

=over 7

=item B<--series>=#,  B<-s>#

=item B<--compat>

Choose different series of answer.  Default 1.  Series zero is same as
the original game and option B<--compat> is a short cut for
B<--series=0>.  If it is not zero, original answer word set is
shuffled by pseudo random numbers using series number as an initial
seed.

=item B<--index>=#, B<-n>#

Specify index. Default index is calculated from days from 2021/06/19.
If the value is negative and you can get yesterday's question by
giving -1.

Answer for option B<-s0n0> is C<cigar>.

=item B<-->[B<no->]B<result>

Show result when succeeded.  Default true.

=item B<--random>

Generate random index every time.

=item B<--try>=#, B<-x>=#

Set try count.  Default 6.

=begin comment

=item B<--answer>=I<word>

Set answer word.  For debug purpose.

=end comment

=back

=head1 COMMANDS

Five letter word is processed as an answer.  Some other input is taken
as a command.

=over 7

=item B<h>, B<hint>

List possible words.

=item B<u>, B<uniq>

List possible words made of unique characters.

=item B<=>I<chars>

If start with equal (C<=>), list words which include all of I<chars>.

=item B<!>I<chars>

If start with exclamation mark (C<!>), list words which does not
include any of I<chars>.

=item I<regex>

Any other string include non-alphabetical character is taken as a
regular expression to filter words.

=item B<!!>

Get word list produced by the last command execution.

=back

These commands can be connected in series.  For example, next command
show possible words start with letter C<z>.

    hint ^z

Next shows all words which does not incude any letter of C<audio> and
C<rents>, and made of unique characters.

    !audio !rents u

=head1 EXAMPLE

    1: solid                    # try word "solid"
    2: panic                    # try word "panic"
    3: hint                     # show hint
    3: !solid !panic =eft uniq  # search word exclude(solidpanic) include(eft)
    3: wheft                    # try word "wheft"
    4: hint                     # show hint
    4: datum                    # try word "datum"
    5: tardy                    # try word "tardy"

=begin html

<p><img width="750" src="https://raw.githubusercontent.com/kaz-utashiro/greple-wordle/main/images/hint-1.png">

=end html

=head1 BUGS

Wrong position character is colored yellow always, even if it is
colored green in other position.

=head1 INSTALL

=head2 CPANMINUS

    $ cpanm App::Greple::wordle
    or
    $ curl -sL http://cpanmin.us | perl - App::Greple::wordle

=head1 SEE ALSO

L<App::Greple::wordle>, L<https://github.com/kaz-utashiro/greple-wordle>

L<App::Greple>, L<https://github.com/kaz-utashiro/greple>

L<https://qiita.com/kaz-utashiro/items/ba6696187f2ce902aa39>

L<https://github.com/alex1770/wordle>

=head1 AUTHOR

Kazumasa Utashiro

=head1 LICENSE

Copyright 2022 Kazumasa Utashiro.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

#  LocalWords:  greple wordle localtime COMPAT Kazumasa Utashiro
