Removed spaces from top-level directory names.

Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
This commit is contained in:
Chris Reuter
2021-11-21 18:30:21 -05:00
parent df2e7426eb
commit d26dbf036a
1725 changed files with 0 additions and 0 deletions

3
33_Dice/perl/README.md Normal file
View File

@@ -0,0 +1,3 @@
Original source downloaded [from Vintage Basic](http://www.vintage-basic.net/games.html)
Conversion to [Perl](https://www.perl.org/)

42
33_Dice/perl/dice.pl Executable file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/perl
use strict;
print ' 'x 34 . "DICE\n";
print ' 'x 15 . "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n";
print "\n\n\n";
my @F;
#REM DANNY FREIDUS;
print "THIS PROGRAM SIMULATES THE ROLLING OF A\n";
print "PAIR OF DICE.\n";
print "YOU ENTER THE NUMBER OF TIMES YOU WANT THE COMPUTER TO\n";
print "'ROLL' THE DICE. WATCH OUT, VERY LARGE NUMBERS TAKE\n";
print "A LONG TIME. IN PARTICULAR, NUMBERS OVER 5000.\n";
my $X;
my $Z;
do {
for (my $Q=1; $Q<=12; $Q++) {
$F[$Q]=0;
}
print "\n"; print "HOW MANY ROLLS";
print "? "; chomp($X = <STDIN>);
for (my $S=1; $S<=$X; $S++) {
my $A=int(6*rand(1)+1);
my $B=int(6*rand(1)+1);
my $R=$A+$B;
$F[$R]=$F[$R]+1;
}
print "\n";
print "TOTAL SPOTS\tNUMBER OF TIMES\n";
for (my $V=2; $V<=12; $V++) {
print "$V\t\t$F[$V]\n";
}
print "\n";
print "\n"; print "TRY AGAIN";
print "? "; chomp($Z = <STDIN>);
} until (uc($Z) ne "YES");
exit;