Ensure hint is reset for new question; auto-hint mode available in =cut block

This commit is contained in:
Pragmatic Software 2016-12-06 17:59:43 -08:00
parent d7040568bc
commit 6decfb7e6c
1 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,7 @@ use QStatskeeper;
my $CJEOPARDY_FILE = 'cjeopardy.txt';
my $CJEOPARDY_DATA = 'data/cjeopardy.dat';
my $CJEOPARDY_HINT = 'data/cjeopardy.hint';
my $CJEOPARDY_SHUFFLE = 'data/cjeopardy.shuffle';
my $TIMELIMIT = 300;
@ -108,6 +109,8 @@ print $fh "$a\n";
print $fh scalar gettimeofday, "\n";
close $fh;
unlink "$CJEOPARDY_HINT-$channel";
my $qstats = QStatskeeper->new;
$qstats->begin;
@ -121,6 +124,12 @@ $qdata->{wrong_streak} = 0;
$qstats->update_question_data($id, $qdata);
$qstats->end;
close $semaphore;
=cut
my $hint = `./cjeopardy_hint.pl candide $channel`;
print $hint;
=cut
sub shuffle_questions {
my $return_index = shift @_;