Skip to content

Commit

Permalink
“”
Browse files Browse the repository at this point in the history
2 bugfixs
  • Loading branch information
Zach Morgan committed Jan 2, 2008
1 parent 2caa6d3 commit a8b8e10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crypto.pl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

sub new_puzzle{
$victorious = FALSE;
%guesses = ();
$fortune = uc get_fortune($min_fortune, $max_fortune);
gen_random_key();
count_letters();
Expand Down Expand Up @@ -112,8 +113,8 @@ sub get_fortune{
my $fortune = `fortune`;
next if length ($fortune) < $min;
next if length ($fortune) > $max;
$fortune =~ s/\t/ /; #tabs to (3) spaces
$fortune =~ s/\n\S/ /; #newlines to 1 space, unless there's space after it.
$fortune =~ s/\t/ /g; #tabs to (3) spaces
$fortune =~ s/\n\S/ /g; #newlines to 1 space, unless there's space after it.
return $fortune;
}
}
Expand Down

0 comments on commit a8b8e10

Please sign in to comment.