+This directory contains version 1.0.1.
+
This is definitely a thinking person's game!
Distantly related to the game Mastermind, you are given clues to help
#!/usr/bin/perl
#
-# Digits 1.0
+# Digits 1.0.1
#
# Copyright (C) 2013 Jason Self <j@jxself.org>
#
$| = 1;
print "\033[2J";
print "\033[0;0H";
- print "\t\t\t\t" . '*** DIGITS ***' . "\n\n";
+ print "\t\t\t" . '*** DIGITS 1.0.1 ***' . "\n";
print "Homepage: http://jxself.org/digits.shtml\n\n";
print "Copyright (C) 2013 Jason Self <j\@jxself.org>\n\n";
+print "Licensed under the GNU AGPL v3 or any later version.\n\n";
print "I will think of a number. The object of the game it to guess the number\n";
print "in as few tries as possible. Each time you guess I will provide a hint:\n\n";
if ($DISTINCT) {
my $no_match = $TRUE;
- for (my $j = 0; $j < $#digits; $j++) {
+ for (my $j = 0; $j < $#digits + 1; $j++) {
if ($digits[$j] == $digit) {
$no_match = $FALSE;
last;
get_options();
while ($TRUE) {
- print "\nWhat is your guess?\n";
+ print "\nWhat is your guess? Type 'q' or 'quit' to exit.\n";
$guess = read_input();
$guessed = check_digits($guess);
}
if ($guessed == $QUIT) {
+ print "\nThe number I had was @digits. Bye!\n";
last;
}
elsif ($guessed) {