From 96518471650e232a8941caee45c960a900128d00 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 29 Jul 2014 20:21:06 +0000 Subject: [PATCH] C Jeopardy: Correct showing of text/answer in "close enough" output due to recent change in handling of typographical case --- PBot/VERSION.pm | 2 +- modules/cjeopardy_answer.pl | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 82a0378b..b10883b9 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 757, + BUILD_REVISION => 758, BUILD_DATE => "2014-07-29", }; diff --git a/modules/cjeopardy_answer.pl b/modules/cjeopardy_answer.pl index a5ae5d04..71f1948a 100755 --- a/modules/cjeopardy_answer.pl +++ b/modules/cjeopardy_answer.pl @@ -47,14 +47,12 @@ foreach my $answer (@valid_answers) { my $length = (length($text) > length($answer)) ? length $text : length $answer; if ($distance / $length < 0.15) { - my $correctness; if ($distance == 0) { - $correctness = "correct!"; + print "'$answer' is correct!\n"; } else { - $correctness = "close enough to '$answer'. You are correct!" + print "'$text' is close enough to '$answer'. You are correct!\n" } - print "'$answer' is $correctness\n"; unlink "$CJEOPARDY_DATA-$channel"; unlink "$CJEOPARDY_HINT-$channel";