Plugin/Wordle: add Polish wordlist

This commit is contained in:
Pragmatic Software 2024-03-17 18:39:09 -07:00
parent 8970978444
commit 51fb92bc39
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
3 changed files with 449902 additions and 15 deletions

449886
data/wordle/polish Normal file

File diff suppressed because it is too large Load Diff

View File

@ -50,6 +50,7 @@ my %wordlists = (
german => '/wordle/german',
italian => '/wordle/italian',
spanish => '/wordle/spanish',
polish => '/wordle/polish',
);
my %color = (
@ -275,21 +276,21 @@ sub make_wordle($self, $channel, $length, $word = undef, $wordlist = 'default')
}
sub show_letters($self, $channel) {
my $result = 'Letters: ';
my $result = 'Letters: ';
foreach my $letter (sort keys $self->{$channel}->{letters}->%*) {
if ($self->{$channel}->{letters}->{$letter} == LETTER_CORRECT) {
$result .= "$color{correct}$letter$color{correct_a}*";
$result .= "$color{reset} ";
} elsif ($self->{$channel}->{letters}->{$letter} == LETTER_PRESENT) {
$result .= "$color{present}$letter$color{present_a}?";
$result .= "$color{reset} ";
} elsif ($self->{$channel}->{letters}->{$letter} == 0) {
$result .= "$letter ";
}
}
foreach my $letter (sort keys $self->{$channel}->{letters}->%*) {
if ($self->{$channel}->{letters}->{$letter} == LETTER_CORRECT) {
$result .= "$color{correct}$letter$color{correct_a}*";
$result .= "$color{reset} ";
} elsif ($self->{$channel}->{letters}->{$letter} == LETTER_PRESENT) {
$result .= "$color{present}$letter$color{present_a}?";
$result .= "$color{reset} ";
} elsif ($self->{$channel}->{letters}->{$letter} == 0) {
$result .= "$letter ";
}
}
return $result . "$color{reset}";
return $result . "$color{reset}";
}
sub show_wordle($self, $channel, $with_letters = 0) {

View File

@ -25,8 +25,8 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4722,
BUILD_DATE => "2024-03-16",
BUILD_REVISION => 4723,
BUILD_DATE => "2024-03-17",
};
sub initialize {}