mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-02-05 19:32:48 -08:00
Merge pull request #889 from JoeStrout/miniscript-batch-5
Miniscript batch 5
This commit is contained in:
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript aceyducey.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "aceyducey"
|
||||
run
|
||||
|
||||
@@ -12,7 +12,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
Note that because this program imports "listUtil", you will need to have a the standard MiniScript libraries somewhere in your import path.
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "amazing"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript animal.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "animal"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript awari.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "awari"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bagels.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bagels"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript banner.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "banner"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript basketball.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "basketball"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript batnum.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "batnum"
|
||||
run
|
||||
|
||||
@@ -12,7 +12,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript battle.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "battle"
|
||||
run
|
||||
|
||||
@@ -12,7 +12,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
But note that the current release (1.2.1) of command-line MiniScript does not properly flush the output buffer when line breaks are suppressed, as this program does when prompting for your next action after a Hit. So, method 2 (below) is recommended for now.
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "blackjack"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bombardment.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bombardment"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bombsaway.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bombsaway"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bounce.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bounce"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bowling.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bowling"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript boxing.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "boxing"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bug.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bug"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bull.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bull"
|
||||
run
|
||||
|
||||
@@ -13,7 +13,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bullseye.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bullseye"
|
||||
run
|
||||
|
||||
@@ -13,7 +13,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bunny.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bunny"
|
||||
run
|
||||
|
||||
@@ -13,7 +13,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript bunny.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "bunny"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript calendar.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "calendar"
|
||||
run
|
||||
|
||||
@@ -13,7 +13,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript change.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "change"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript checkers.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "checkers"
|
||||
run
|
||||
|
||||
@@ -13,7 +13,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript chemist.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "chemist"
|
||||
run
|
||||
|
||||
@@ -15,7 +15,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript chief.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "chief"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript chomp.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "chomp"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript civilwar.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "civilwar"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript combat.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "combat"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript craps.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "craps"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript cube.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "cube"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript depthcharge.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "depthcharge.ms"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript diamond.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "diamond"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript dice.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "dice"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript digits.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "digits"
|
||||
run
|
||||
|
||||
@@ -17,7 +17,7 @@ or
|
||||
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "evenwins"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript flipflop.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "flipflop"
|
||||
run
|
||||
|
||||
30
00_Alternate_Languages/37_Football/MiniScript/README.md
Normal file
30
00_Alternate_Languages/37_Football/MiniScript/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript football.ms
|
||||
or
|
||||
miniscript ftball.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "football"
|
||||
run
|
||||
or
|
||||
load "ftball"
|
||||
run
|
||||
|
||||
|
||||
#### Apology from the Translator
|
||||
|
||||
These MiniScript programs were actually ported from the JavaScript ports of the original BASIC programs. I did that because the BASIC code (of both programs) was incomprehensible spaghetti. The JavaScript port, however, was essentially the same — and so are the MiniScript ports. The very structure of these programs makes them near-impossible to untangle.
|
||||
|
||||
If I were going to write a football simulation from scratch, I would approach it very differently. But in that case I would have either a detailed specification of how the program should behave, or at least enough understanding of American football to design it myself as I go. Neither is the case here (and we're supposed to be porting the original programs, not making up our own).
|
||||
|
||||
So, I'm sorry. Please take these programs as proof that you can write bad code even in the most simple, elegant languages. And I promise to try harder on future translations!
|
||||
402
00_Alternate_Languages/37_Football/MiniScript/football.ms
Normal file
402
00_Alternate_Languages/37_Football/MiniScript/football.ms
Normal file
@@ -0,0 +1,402 @@
|
||||
player_data = [17,8,4,14,19,3,10,1,7,11,15,9,5,20,13,18,16,2,12,6,
|
||||
20,2,17,5,8,18,12,11,1,4,19,14,10,7,9,15,6,13,16,3]
|
||||
aa = [0]*21
|
||||
ba = [0]*21
|
||||
ca = [0]*41
|
||||
ha = [0]*3
|
||||
ta = [0]*3
|
||||
wa = [0]*3
|
||||
xa = [0]*3
|
||||
ya = [0]*3
|
||||
za = [0]*3
|
||||
ms = [null, "",""]
|
||||
da = [0]*3
|
||||
ps = ["", "PITCHOUT","TRIPLE REVERSE","DRAW","QB SNEAK","END AROUND",
|
||||
"DOUBLE REVERSE","LEFT SWEEP","RIGHT SWEEP","OFF TACKLE",
|
||||
"WISHBONE OPTION","FLARE PASS","SCREEN PASS",
|
||||
"ROLL OUT OPTION","RIGHT CURL","LEFT CURL","WISHBONE OPTION",
|
||||
"SIDELINE PASS","HALF-BACK OPTION","RAZZLE-DAZZLE","BOMB!!!!"]
|
||||
globals.p = 0
|
||||
globals.t = 0
|
||||
|
||||
printFieldHeaders = function
|
||||
print "TEAM 1 [0 10 20 30 40 50 60 70 80 90 100] TEAM 2"
|
||||
print
|
||||
end function
|
||||
|
||||
printSeparator = function
|
||||
print "+" * 67
|
||||
end function
|
||||
|
||||
showBall = function
|
||||
print " " * (da[t] + 5 + p / 2) + ms[t]
|
||||
printFieldHeaders
|
||||
end function
|
||||
|
||||
showScores = function
|
||||
print
|
||||
print "TEAM 1 SCORE IS " + ha[1]
|
||||
print "TEAM 2 SCORE IS " + ha[2]
|
||||
print
|
||||
if ha[t] >= e then
|
||||
print "TEAM " + t + " WINS*******************"
|
||||
return true
|
||||
end if
|
||||
return false
|
||||
end function
|
||||
|
||||
losePossession = function
|
||||
print
|
||||
print "** LOSS OF POSSESSION FROM TEAM " + t + " TO TEAM " + ta[t]
|
||||
print
|
||||
printSeparator
|
||||
print
|
||||
globals.t = ta[t]
|
||||
end function
|
||||
|
||||
touchdown = function
|
||||
print
|
||||
print "TOUCHDOWN BY TEAM " + t + " *********************YEA TEAM"
|
||||
q = 7
|
||||
if rnd <= 0.1 then
|
||||
q = 6
|
||||
print "EXTRA POINT NO GOOD"
|
||||
else
|
||||
print "EXTRA POINT GOOD"
|
||||
end if
|
||||
ha[t] += q
|
||||
end function
|
||||
|
||||
askYesNo = function(prompt)
|
||||
while true
|
||||
yn = input(prompt + "? ").lower
|
||||
if not yn then continue
|
||||
if yn[0] == "y" then return "YES"
|
||||
if yn[0] == "n" then return "NO"
|
||||
end while
|
||||
end function
|
||||
|
||||
|
||||
print " "*32 + "FOOTBALL"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
print "Presenting N.F.U. Football (No FORTRAN Used)"
|
||||
print; print
|
||||
if askYesNo("Do you want instructions") == "YES" then
|
||||
print "This is a football game for two teams in which players must"
|
||||
print "prepare a tape with a data statement (1770 for team 1,"
|
||||
print "1780 for team 2) in which each team scrambles nos. 1-20"
|
||||
print "These numbers are then assigned to twenty given plays."
|
||||
print "A list of nos. and their plays is provided with"
|
||||
print "both teams having the same plays. The more similar the"
|
||||
print "plays the less yardage gained. Scores are given"
|
||||
print "whenever scores are made. Scores may also be obtained"
|
||||
print "by inputting 99,99 for play nos. To punt or attempt a"
|
||||
print "field goal, input 77,77 for play numbers. Questions will be"
|
||||
print "asked then. On 4th down, you will also be asked whether"
|
||||
print "you want to punt or attempt a field goal. If the answer to"
|
||||
print "both questions is no it will be assumed you want to"
|
||||
print "try and gain yardage. Answer all questions Yes or No."
|
||||
print "The game is played until players terminate (control-c)."
|
||||
print "Please prepare a tape and run."
|
||||
end if
|
||||
print
|
||||
e = input("Please input score limit on game: ").val
|
||||
for i in range(1, 40)
|
||||
if i <= 20 then
|
||||
aa[player_data[i - 1]] = i
|
||||
else
|
||||
ba[player_data[i - 1]] = i - 20
|
||||
end if
|
||||
ca[i] = player_data[i - 1]
|
||||
end for
|
||||
l = 0
|
||||
globals.t = 1
|
||||
while true
|
||||
print "TEAM " + t + " PLAY CHART"
|
||||
print "NO. PLAY"
|
||||
for i in range(1, 20)
|
||||
print (ca[i+1] + " "*6)[:6] + ps[i]
|
||||
end for
|
||||
l += 20
|
||||
globals.t = 2
|
||||
print
|
||||
print "TEAR OFF HERE----------------------------------------------"
|
||||
for x in range(1, 11); print; end for
|
||||
wait 3
|
||||
if l != 20 then break
|
||||
end while
|
||||
|
||||
playGame = function
|
||||
da[1] = 0
|
||||
da[2] = 3
|
||||
ms[1] = "--->"
|
||||
ms[2] = "<---"
|
||||
ha[1] = 0
|
||||
ha[2] = 0
|
||||
ta[1] = 2
|
||||
ta[2] = 1
|
||||
wa[1] = -1
|
||||
wa[2] = 1
|
||||
xa[1] = 100
|
||||
xa[2] = 0
|
||||
ya[1] = 1
|
||||
ya[2] = -1
|
||||
za[1] = 0
|
||||
za[2] = 100
|
||||
globals.p = 0
|
||||
printFieldHeaders
|
||||
print "TEAM 1 defend 0 YD goal -- TEAM 2 defends 100 YD goal."
|
||||
globals.t = floor(2 * rnd + 1)
|
||||
print
|
||||
print "The coin is flipped"
|
||||
routine = 1
|
||||
while true
|
||||
if routine <= 1 then
|
||||
globals.p = xa[t] - ya[t] * 40
|
||||
printSeparator
|
||||
print
|
||||
print "Team " + t + " receives kick-off"
|
||||
k = floor(26 * rnd + 40)
|
||||
end if
|
||||
if routine <= 2 then
|
||||
globals.p = p - ya[t] * k
|
||||
end if
|
||||
if routine <= 3 then
|
||||
if wa[t] * p >= za[t] + 10 then
|
||||
print
|
||||
print "Ball went out of endzone --automatic touchback--"
|
||||
globals.p = za[t] - wa[t] * 20
|
||||
if routine <= 4 then routine = 5
|
||||
else
|
||||
print "Ball went " + k + " yards. Now on " + p
|
||||
showBall
|
||||
end if
|
||||
end if
|
||||
if routine <= 4 then
|
||||
if askYesNo("Team " + t + " do you want to runback") == "YES" then
|
||||
k = floor(9 * rnd + 1)
|
||||
r = floor(((xa[t] - ya[t] * p + 25) * rnd - 15) / k)
|
||||
globals.p = p - wa[t] * r
|
||||
print
|
||||
print "Runback team " + t + " " + r + " yards"
|
||||
g = rnd
|
||||
if g < 0.25 then
|
||||
losePossession
|
||||
routine = 4
|
||||
continue
|
||||
else if ya[t] * p >= xa[t] then
|
||||
touchdown
|
||||
if showScores then return
|
||||
globals.t = ta[t]
|
||||
routine = 1
|
||||
continue
|
||||
else if wa[t] * p >= za[t] then
|
||||
print
|
||||
print "Safety against team " + t + " **********************OH-OH"
|
||||
ha[ta[t]] += 2
|
||||
if showScores then return
|
||||
globals.p = za[t] - wa[t] * 20
|
||||
if askYesNo("Team " + t + " do you want to punt instead of a kickoff") == "YES" then
|
||||
print
|
||||
print "Team " + t + " will punt"
|
||||
g = rnd
|
||||
if g < 0.25 then
|
||||
losePossession
|
||||
routine = 4
|
||||
continue
|
||||
end if
|
||||
print
|
||||
printSeparator
|
||||
k = floor(25 * rnd + 35)
|
||||
globals.t = ta[t]
|
||||
routine = 2
|
||||
continue
|
||||
end if
|
||||
touchdown
|
||||
if showScores then return
|
||||
globals.t = ta[t]
|
||||
routine = 1
|
||||
continue
|
||||
else
|
||||
routine = 5
|
||||
continue
|
||||
end if
|
||||
else // player does not want to runback
|
||||
if wa[t] * p >= za[t] then globals.p = za[t] - wa[t] * 20
|
||||
end if
|
||||
end if
|
||||
if routine <= 5 then
|
||||
d = 1
|
||||
s = p
|
||||
end if
|
||||
if routine <= 6 then
|
||||
print "=" * 67
|
||||
print "TEAM " + t + " DOWN " + d + " ON " + p
|
||||
if d == 1 then
|
||||
if ya[t] * (p + ya[t] * 10) >= xa[t] then
|
||||
c = 8
|
||||
else
|
||||
c = 4
|
||||
end if
|
||||
end if
|
||||
if c != 8 then
|
||||
print " "*27 + (10 - (ya[t] * p - ya[t] * s)) + " yards to 1st down"
|
||||
else
|
||||
print " "*27 + (xa[t] - ya[t] * p) + " yards"
|
||||
end if
|
||||
showBall
|
||||
if d == 4 then routine = 8
|
||||
end if
|
||||
if routine <= 7 then
|
||||
u = floor(3 * rnd - 1)
|
||||
while true
|
||||
str = input("Input offensive play, defensive play: ")
|
||||
str = str.replace(",", " ").replace(" ", " ").split
|
||||
if t == 1 then
|
||||
p1 = str[0].val
|
||||
p2 = str[1].val
|
||||
else
|
||||
p2 = str[0].val
|
||||
p1 = str[1].val
|
||||
end if
|
||||
if p1 == 99 then
|
||||
if showScores then return
|
||||
continue
|
||||
end if
|
||||
if 1 <= p1 <= 20 and 1 <= p2 <= 20 then break
|
||||
print "Illegal play number, check and"
|
||||
end while
|
||||
end if
|
||||
if d == 4 or p1 == 77 then
|
||||
if askYesNo("Does team " + t + " want to punt") == "YES" then
|
||||
print
|
||||
print "Team " + t + " will punt"
|
||||
if rnd < 0.25 then
|
||||
losePossession
|
||||
routine = 4
|
||||
continue
|
||||
end if
|
||||
print
|
||||
printSeparator
|
||||
k = floor(25 * rnd + 35)
|
||||
globals.t = ta[t]
|
||||
routine = 2
|
||||
continue
|
||||
end if
|
||||
if askYesNo("Does team " + t + " want to attempt a field goal") == "YES" then
|
||||
print
|
||||
print "Team " + t + " will attempt a field goal"
|
||||
if rnd < 0.025 then
|
||||
losePossession
|
||||
routine = 4
|
||||
continue
|
||||
else
|
||||
f = floor(35 * rnd + 20)
|
||||
print
|
||||
print "Kick is " + f + " yards long"
|
||||
globals.p = p - wa[t] * f
|
||||
if rnd < 0.35 then
|
||||
print "Ball went wide"
|
||||
else if ya[t] * p >= xa[t] then
|
||||
print "FIELD GOLD GOOD FOR TEAM " + t + " *********************YEA"
|
||||
q = 3
|
||||
ha[t] = ha[t] + q
|
||||
if showScores then return
|
||||
globals.t = ta[t]
|
||||
routine = 1
|
||||
continue
|
||||
end if
|
||||
print "Field goal unsuccesful team " + t + "-----------------too bad"
|
||||
print
|
||||
printSeparator
|
||||
if ya[t] * p < xa[t] + 10 then
|
||||
print
|
||||
print "Ball now on " + p
|
||||
globals.t = ta[t]
|
||||
showBall
|
||||
routine = 4
|
||||
continue
|
||||
else
|
||||
globals.t = ta[t]
|
||||
routine = 3
|
||||
continue
|
||||
end if
|
||||
end if
|
||||
else
|
||||
routine = 7
|
||||
continue
|
||||
end if
|
||||
end if
|
||||
y = floor(abs(aa[p1] - ba[p2]) / 19 * ((xa[t] - ya[t] * p + 25) * rnd - 15))
|
||||
print
|
||||
if t == 1 and aa[p1] < 11 or t == 2 and ba[p2] < 11 then
|
||||
print "The ball was run"
|
||||
else if u == 0 then
|
||||
print "Pass incomplete team " + t
|
||||
y = 0
|
||||
else
|
||||
if rnd <= 0.025 and y > 2 then
|
||||
print "Pass completed"
|
||||
else
|
||||
print "Quarterback scrambled"
|
||||
end if
|
||||
end if
|
||||
globals.p = p - wa[t] * y
|
||||
print
|
||||
print "Net yards gained on down " + d + " are " + y
|
||||
|
||||
if rnd <= 0.025 then
|
||||
losePossession
|
||||
routine = 4
|
||||
continue
|
||||
else if ya[t] * p >= xa[t] then
|
||||
touchdown
|
||||
if showScores then return
|
||||
globals.t = ta[t]
|
||||
routine = 1
|
||||
continue
|
||||
else if wa[t] * p >= za[t] then
|
||||
print
|
||||
print "SAFETY AGAINST TEAM " + t + " **********************OH-OH"
|
||||
ha[ta[t]] = ha[ta[t]] + 2
|
||||
if showScores then return
|
||||
globals.p = za[t] - wa[t] * 20
|
||||
if askYesNo("Team " + t + " do you want to punt instead of a kickoff") == "YES" then
|
||||
print
|
||||
print "Team " + t + " will punt"
|
||||
if rnd < 0.25 then
|
||||
losePossession
|
||||
routine = 4
|
||||
continue
|
||||
end if
|
||||
print
|
||||
printSeparator
|
||||
k = floor(25 * rnd + 35)
|
||||
globals.t = ta[t]
|
||||
routine = 2
|
||||
continue
|
||||
end if
|
||||
touchdown
|
||||
if showScores then return
|
||||
globals.t = ta[t]
|
||||
routine = 1
|
||||
else if ya[t] * p - ya[t] * s >= 10 then
|
||||
routine = 5
|
||||
else
|
||||
d += 1
|
||||
if d != 5 then
|
||||
routine = 6
|
||||
else
|
||||
print
|
||||
print "Conversion unsuccessful team " + t
|
||||
globals.t = ta[t]
|
||||
print
|
||||
printSeparator
|
||||
routine = 5
|
||||
end if
|
||||
end if
|
||||
end while
|
||||
end function
|
||||
|
||||
playGame
|
||||
431
00_Alternate_Languages/37_Football/MiniScript/ftball.ms
Normal file
431
00_Alternate_Languages/37_Football/MiniScript/ftball.ms
Normal file
@@ -0,0 +1,431 @@
|
||||
os = ["Dartmouth", ""]
|
||||
sa = [0, 1]
|
||||
ls = ["", "Kick","receive"," yard ","run back for ","ball on ",
|
||||
"yard line"," simple run"," tricky run"," short pass",
|
||||
" long pass","punt"," quick kick "," place kick"," loss ",
|
||||
" no gain","gain "," touchdown "," touchback ","safety***",
|
||||
"junk"]
|
||||
p = 0
|
||||
x = 0
|
||||
x1 = 0
|
||||
|
||||
fnf = function(x); return 1 - 2 * p; end function
|
||||
fng = function(z); return p * (x1 - x) + (1 - p) * (x - x1); end function
|
||||
|
||||
show_score = function
|
||||
print
|
||||
print "SCORE: " + sa[0] + " TO " + sa[1]
|
||||
print
|
||||
print
|
||||
end function
|
||||
|
||||
show_position = function
|
||||
if x <= 50 then
|
||||
print ls[5] + os[0] + " " + x + " " + ls[6]
|
||||
else
|
||||
print ls[5] + os[1] + " " + (100 - x) + " " + ls[6]
|
||||
end if
|
||||
end function
|
||||
|
||||
offensive_td = function
|
||||
print ls[17] + "***"
|
||||
if rnd <= 0.8 then
|
||||
sa[p] += 7
|
||||
print "Kick is good."
|
||||
else
|
||||
print "Kick is off to the side"
|
||||
sa[p] += 6
|
||||
end if
|
||||
show_score
|
||||
print os[p] + " kicks off"
|
||||
globals.p = 1 - p
|
||||
end function
|
||||
|
||||
// Main program
|
||||
main = function
|
||||
print " "*33 + "FTBALL"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print
|
||||
print
|
||||
print "This is Dartmouth championship football."
|
||||
print
|
||||
print "You will quarterback Dartmouth. Call plays as follows:"
|
||||
print "1= simple run; 2= tricky run; 3= short pass;"
|
||||
print "4= long pass; 5= punt; 6= quick kick; 7= place kick."
|
||||
print
|
||||
os[1] = input("Choose your opponent: ").upper
|
||||
os[0] = "DARMOUTH"
|
||||
print
|
||||
sa[0] = 0
|
||||
sa[1] = 0
|
||||
globals.p = floor(rnd * 2)
|
||||
print os[p] + " won the toss"
|
||||
if p != 0 then
|
||||
print os[1] + " Elects to receive."
|
||||
print
|
||||
else
|
||||
print "Do you elect to kick or receive? "
|
||||
while true
|
||||
str = input.lower
|
||||
if str and (str[0] == "k" or str[0] == "r") then break
|
||||
print "Incorrect answer. Please type 'kick' or 'receive'"
|
||||
end while
|
||||
if str[0] == "k" then e = 1 else e = 2
|
||||
if e == 1 then globals.p = 1
|
||||
end if
|
||||
globals.t = 0
|
||||
start = 1
|
||||
while true
|
||||
if start <= 1 then
|
||||
x = 40 + (1 - p) * 20
|
||||
end if
|
||||
if start <= 2 then
|
||||
y = floor(200 * ((rnd - 0.5))^3 + 55)
|
||||
print " " + y + " " + ls[3] + " kickoff"
|
||||
x = x - fnf(1) * y
|
||||
if abs(x - 50) >= 50 then
|
||||
print "Touchback for " + os[p] + "."
|
||||
x = 20 + p * 60
|
||||
start = 4
|
||||
else
|
||||
start = 3
|
||||
end if
|
||||
end if
|
||||
if start <= 3 then
|
||||
y = floor(50 * (rnd)^2) + (1 - p) * floor(50 * (rnd)^4)
|
||||
x = x + fnf(1) * y
|
||||
if abs(x - 50) < 50 then
|
||||
print " " + y + " " + ls[3] + " runback"
|
||||
else
|
||||
print ls[4]
|
||||
offensive_td
|
||||
start = 1
|
||||
continue
|
||||
end if
|
||||
end if
|
||||
if start <= 4 then
|
||||
// First down
|
||||
show_position
|
||||
end if
|
||||
if start <= 5 then
|
||||
x1 = x
|
||||
d = 1
|
||||
print
|
||||
print "First down " + os[p] + "***"
|
||||
print
|
||||
print
|
||||
end if
|
||||
// New play
|
||||
globals.t += 1
|
||||
if t == 30 then
|
||||
if rnd <= 1.3 then
|
||||
print "Game delayed. Dog on field."
|
||||
print
|
||||
end if
|
||||
end if
|
||||
if t >= 50 and rnd <= 0.2 then break
|
||||
if p != 1 then
|
||||
// Opponent's play
|
||||
if d <= 1 then
|
||||
if rnd > 1/3 then z = 1 else z = 3
|
||||
else if d != 4 then
|
||||
if 10 + x - x1 < 5 or x < 5 then
|
||||
if rnd > 1/3 then z = 1 else z = 3
|
||||
else if x <= 10 then
|
||||
a = floor(2 * rnd)
|
||||
z = 2 + a
|
||||
else if x <= x1 or d < 3 or x < 45 then
|
||||
a = floor(2 * rnd)
|
||||
z = 2 + a * 2
|
||||
else
|
||||
if (rnd > 1 / 4) then
|
||||
z = 4
|
||||
else
|
||||
z = 6
|
||||
end if
|
||||
end if
|
||||
else
|
||||
if x <= 30 then
|
||||
z = 5
|
||||
else if 10 + x - x1 < 3 or x < 3 then
|
||||
if rnd > 1/3 then z = 1 else z = 3
|
||||
else
|
||||
z = 7
|
||||
end if
|
||||
end if
|
||||
else
|
||||
while true
|
||||
z = input("Next play? ").val
|
||||
if 1 <= z <= 7 then break
|
||||
print "Illegal play number, retype"
|
||||
end while
|
||||
end if
|
||||
f = 0
|
||||
print ls[z + 6] + ". "
|
||||
r = rnd * (0.98 + fnf(1) * 0.02)
|
||||
r1 = rnd
|
||||
if z == 1 or z == 2 then // Simple Run or Tricky Run
|
||||
done = false
|
||||
if z == 1 then
|
||||
y = floor(24 * (r - 0.5)^3 + 3)
|
||||
if rnd >= 0.05 then
|
||||
routine = 1
|
||||
done = true
|
||||
end if
|
||||
else
|
||||
y = floor(20 * r - 5)
|
||||
if rnd > 0.1 then
|
||||
routine = 1
|
||||
done = true
|
||||
end if
|
||||
end if
|
||||
if not done then
|
||||
f = -1
|
||||
x3 = x
|
||||
x = x + fnf(1) * y
|
||||
if abs(x - 50) < 50 then
|
||||
print "*** Fumble after "
|
||||
routine = 2
|
||||
else
|
||||
print "*** Fumble."
|
||||
routine = 4
|
||||
end if
|
||||
end if
|
||||
else if z == 3 or z == 4 then // Short Pass or Long Pass
|
||||
if z == 3 then
|
||||
y = floor(60 * (r1 - 0.5)^3 + 10)
|
||||
else
|
||||
y = floor(160 * ((r1 - 0.5))^3 + 30)
|
||||
end if
|
||||
if z == 3 and r < 0.05 or z == 4 and r < 0.1 then
|
||||
if d != 4 then
|
||||
print "Intercepted."
|
||||
f = -1
|
||||
x = x + fnf(1) * y
|
||||
if abs(x - 50) >= 50 then
|
||||
routine = 4
|
||||
else
|
||||
routine = 3
|
||||
end if
|
||||
else
|
||||
y = 0
|
||||
if rnd < 0.3 then
|
||||
print "Batted down. ", ""
|
||||
else
|
||||
print "Incomplete. ", ""
|
||||
end if
|
||||
routine = 1
|
||||
end if
|
||||
else if z == 4 and r < 0.3 then
|
||||
print "Passer tackled. ", ""
|
||||
y = -floor(15 * r1 + 3)
|
||||
routine = 1
|
||||
else if z == 3 and r < 0.15 then
|
||||
print "Passer taclked. ", ""
|
||||
y = -floor(10 * r1)
|
||||
routine = 1
|
||||
else if z == 3 and r < 0.55 or z == 4 and r < 0.75 then
|
||||
y = 0
|
||||
if rnd < 0.3 then
|
||||
print "Batted down. ", ""
|
||||
else
|
||||
print "Incomplete. ", ""
|
||||
end if
|
||||
routine = 1
|
||||
else
|
||||
print "Complete. ", ""
|
||||
routine = 1
|
||||
end if
|
||||
else if z == 5 or z == 6 then // Punt or Quick Kick
|
||||
y = floor(100 * ((r - 0.5))^3 + 35)
|
||||
if (d != 4) then y = floor(y * 1.3)
|
||||
print " " + y + " " + ls[3] + " punt"
|
||||
if abs(x + y * fnf(1) - 50) < 50 and d >= 4 then
|
||||
y1 = floor((r1)^2 * 20)
|
||||
print " " + y1 + " " + ls[3] + " Run back"
|
||||
y = y - y1
|
||||
end if
|
||||
f = -1
|
||||
x = x + fnf(1) * y
|
||||
if abs(x - 50) >= 50 then routine = 4 else routine = 3
|
||||
else if z == 7 then // Place kick
|
||||
y = floor(100 * ((r - 0.5))^3 + 35)
|
||||
if r1 <= 0.15 then
|
||||
print "Kick is blocked ***"
|
||||
x = x - 5 * fnf(1)
|
||||
globals.p = 1 - p
|
||||
start = 4
|
||||
continue
|
||||
end if
|
||||
x = x + fnf(1) * y
|
||||
if abs(x - 50) >= 60 then
|
||||
if r1 <= 0.5 then
|
||||
print "Kick is off to the side."
|
||||
print ls[18]
|
||||
globals.p = 1 - p
|
||||
x = 20 + p * 60
|
||||
start = 4
|
||||
continue
|
||||
else
|
||||
print "Field goal ***"
|
||||
sa[p] = sa[p] + 3
|
||||
show_score
|
||||
print os[p] + " kicks off"
|
||||
globals.p = 1 - p
|
||||
start = 1
|
||||
continue
|
||||
end if
|
||||
else
|
||||
print "Kick is short."
|
||||
if abs(x - 50) >= 50 then
|
||||
// Touchback
|
||||
print ls[18]
|
||||
globals.p = 1 - p
|
||||
x = 20 + p * 60
|
||||
start = 4
|
||||
continue
|
||||
end if
|
||||
globals.p = 1 - p
|
||||
start = 3
|
||||
continue
|
||||
end if
|
||||
end if
|
||||
// Gain or loss
|
||||
if routine <= 1 then
|
||||
x3 = x
|
||||
x = x + fnf(1) * y
|
||||
if abs(x - 50) >= 50 then
|
||||
routine = 4
|
||||
end if
|
||||
end if
|
||||
if routine <= 2 then
|
||||
if y != 0 then
|
||||
print " " + abs(y) + " " + ls[3]
|
||||
if (y < 0) then
|
||||
yt = -1
|
||||
else if y > 0 then
|
||||
yt = 1
|
||||
else
|
||||
yt = 0
|
||||
end if
|
||||
print ls[15 + yt]
|
||||
if abs(x3 - 50) <= 40 and rnd < 0.1 then
|
||||
// Penalty
|
||||
p3 = floor(2 * rnd)
|
||||
print os[p3] + " offsides -- penalty of 5 yards."
|
||||
print
|
||||
print
|
||||
if p3 != 0 then
|
||||
print "Do you accept the penalty?"
|
||||
while true
|
||||
str = input.lower
|
||||
if str and (str[0] == "y" or str[0] == "n") then break
|
||||
print "Yype 'yes' or 'no'"
|
||||
end while
|
||||
if str[0] == "y" then
|
||||
f = 0
|
||||
d = d - 1
|
||||
if (p != p3) then
|
||||
x = x3 + fnf(1) * 5
|
||||
else
|
||||
x = x3 - fnf(1) * 5
|
||||
end if
|
||||
end if
|
||||
else
|
||||
// opponent's strategy on penalty
|
||||
if ((p != 1 and (y <= 0 or f < 0 or fng(1) < 3 * d - 2)) or
|
||||
(p == 1 and ((y > 5 and f >= 0) or d < 4 or fng(1) >= 10))) then
|
||||
print "penalty refused."
|
||||
else
|
||||
print "penalty accepted."
|
||||
f = 0
|
||||
d = d - 1
|
||||
if (p != p3) then
|
||||
x = x3 + fnf(1) * 5
|
||||
else
|
||||
x = x3 - fnf(1) * 5
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
routine = 3
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
if routine <= 3 then
|
||||
show_position
|
||||
if f != 0 then
|
||||
globals.p = 1 - p
|
||||
start = 5
|
||||
continue
|
||||
else if fng(1) >= 10 then
|
||||
start = 5
|
||||
continue
|
||||
else if d == 4 then
|
||||
globals.p = 1 - p
|
||||
start = 5
|
||||
continue
|
||||
else
|
||||
d += 1
|
||||
print "DOWN: " + d + " "
|
||||
if (x1 - 50) * fnf(1) >= 40 then
|
||||
print "Goal to go"
|
||||
else
|
||||
print "Yards to go: " + (10 - fng(1))
|
||||
end if
|
||||
print
|
||||
print
|
||||
start = 6
|
||||
continue
|
||||
end if
|
||||
end if
|
||||
if routine <= 4 then
|
||||
// Ball in end-zone
|
||||
e = (x >= 100)
|
||||
case = 1 + e - f * 2 + p * 4
|
||||
if case == 1 or case == 5 then
|
||||
// Safety
|
||||
sa[1 - p] = sa[1 - p] + 2
|
||||
print ls[19]
|
||||
show_score
|
||||
print os[p] + " kicks off from its 20 yard line."
|
||||
x = 20 + p * 60
|
||||
globals.p = 1 - p
|
||||
start = 2
|
||||
continue
|
||||
end if
|
||||
if case == 3 or case == 6 then
|
||||
// defensive td
|
||||
print ls[17] + "for " + os[1 - p] + "***"
|
||||
globals.p = 1 - p
|
||||
end if
|
||||
if case == 3 or case == 6 or case == 2 or case == 8 then
|
||||
// offensive td
|
||||
print ls[17] + "***"
|
||||
if rnd <= 0.8 then
|
||||
sa[p] = sa[p] + 7
|
||||
print "kick is good."
|
||||
else
|
||||
print "kick is off to the side"
|
||||
sa[p] = sa[p] + 6
|
||||
end if
|
||||
show_score
|
||||
print os[p] + " kicks off"
|
||||
globals.p = 1 - p
|
||||
start = 1
|
||||
continue
|
||||
end if
|
||||
if case == 4 or case == 7 then
|
||||
// Touchback
|
||||
print ls[18]
|
||||
globals.p = 1 - p
|
||||
x = 20 + p * 60
|
||||
start = 4
|
||||
continue
|
||||
end if
|
||||
end if
|
||||
end while
|
||||
print "END OF GAME ***"
|
||||
print "FINAL SCORE: " + os[0] + ": " + sa[0] + " " + os[1] + ": " + sa[1]
|
||||
end function
|
||||
|
||||
main
|
||||
16
00_Alternate_Languages/38_Fur_Trader/MiniScript/README.md
Normal file
16
00_Alternate_Languages/38_Fur_Trader/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript furtrader.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "furtrader"
|
||||
run
|
||||
171
00_Alternate_Languages/38_Fur_Trader/MiniScript/furtrader.ms
Normal file
171
00_Alternate_Languages/38_Fur_Trader/MiniScript/furtrader.ms
Normal file
@@ -0,0 +1,171 @@
|
||||
print " "*31 + "Fur Trader"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
|
||||
furs = [0,0,0,0] // how many of each type of fur you have
|
||||
value = [0,0,0,0] // value of each type of fur
|
||||
furNames = "mink beaver ermine fox".split
|
||||
|
||||
getYesNo = function
|
||||
while true
|
||||
ans = input("Answer yes or no: ").upper
|
||||
if not ans then continue
|
||||
if ans[0] == "Y" then return "YES"
|
||||
if ans[0] == "N" then return "NO"
|
||||
end while
|
||||
end function
|
||||
|
||||
printInstructions = function
|
||||
print "You are the leader of a French fur trading expedition in "
|
||||
print "1776 leaving the Lake Ontario area to sell furs and get"
|
||||
print "supplies for the next year. You have a choice of three"
|
||||
print "forts at which you may trade. The cost of supplies"
|
||||
print "and the amount you receive for your furs will depend"
|
||||
print "on the fort that you choose."
|
||||
print
|
||||
end function
|
||||
|
||||
pickFort = function
|
||||
print
|
||||
while true
|
||||
print "You may trade your furs at fort 1, fort 2,"
|
||||
print "or fort 3. Fort 1 is Fort Hochelaga (Montreal)"
|
||||
print "and is under the protection of the French army."
|
||||
print "Fort 2 is Fort Stadacona (Quebec) and is under the"
|
||||
print "protection of the French Army. However, you must"
|
||||
print "make a portage and cross the Lachine rapids."
|
||||
print "Fort 3 is Fort New York and is under Dutch control."
|
||||
print "You must cross through Iroquois land."
|
||||
b = input("Answer 1, 2, or 3: ").val
|
||||
if b == 1 then
|
||||
print "You have chosen the easiest route. However, the fort"
|
||||
print "is far from any seaport. The value"
|
||||
print "you receive for your furs will be low and the cost"
|
||||
print "of supplies higher than at Forts Stadacona or New York."
|
||||
else if b == 2 then
|
||||
print "You have chosen a hard route. It is, in comparsion,"
|
||||
print "harder than the route to Hochelaga but easier than"
|
||||
print "the route to New York. You will receive an average value"
|
||||
print "for your furs and the cost of your supplies will be average."
|
||||
else if b == 3 then
|
||||
print "You have chosen the most difficult route. At"
|
||||
print "Fort New York you will receive the highest value"
|
||||
print "for your furs. The cost of your supplies"
|
||||
print "will be lower than at all the other forts."
|
||||
else
|
||||
continue
|
||||
end if
|
||||
print "Do you want to trade at another fort?"
|
||||
if getYesNo == "NO" then return b
|
||||
end while
|
||||
end function
|
||||
|
||||
visitFort = function(fort)
|
||||
print
|
||||
if fort == 1 then
|
||||
value[0] = floor((.2*rnd+.7)*100+.5)/100
|
||||
value[2] = floor((.2*rnd+.65)*100+.5)/100
|
||||
value[1] = floor((.2*rnd+.75)*100+.5)/100
|
||||
value[3] = floor((.2*rnd+.8)*100+.5)/100
|
||||
print "Supplies at Fort Hochelaga cost $150.00."
|
||||
print "Your travel expenses to Hochelaga were $10.00."
|
||||
globals.money -= 150 + 10
|
||||
else if fort == 2 then
|
||||
value[0] = floor((.3*rnd+.85)*100+.5)/100
|
||||
value[2] = floor((.15*rnd+.8)*100+.5)/100
|
||||
value[1] = floor((.2*rnd+.9)*100+.5)/100
|
||||
p = floor(10*rnd)+1
|
||||
if p <= 2 then
|
||||
furs[1] = 0
|
||||
print "Your beaver were too heavy to carry across"
|
||||
print "the portage. You had to leave the pelts, but found"
|
||||
print "them stolen when you returned."
|
||||
else if p <= 6 then
|
||||
print "You arrived safely at Fort Stadacona."
|
||||
else if p <= 8 then
|
||||
for j in range(0,3); furs[j] = 0; end for
|
||||
print "Your canoe upset in the Lachine rapids. You"
|
||||
print "lost all your furs."
|
||||
else if furs[3] then
|
||||
furs[3] = 0
|
||||
print "Your fox pelts were not cured properly."
|
||||
print "No one will buy them."
|
||||
end if
|
||||
print "Supplies at Fort Stadacona cost $125.00."
|
||||
print "Your travel expenses to Stadacona were $15.00."
|
||||
globals.money -= 125 + 15
|
||||
else
|
||||
value[0] = floor((.15*rnd+1.05)*100+.5)/100
|
||||
value[3] = floor((.25*rnd+1.1)*100+.5)/100
|
||||
p = floor(10*rnd)+1
|
||||
if p <= 2 then
|
||||
print "You were attacked by a party of Iroquois."
|
||||
print "All people in your trading group were"
|
||||
print "killed. This ends the game."
|
||||
globals.gameOver = true
|
||||
return
|
||||
else if p<=6 then
|
||||
print "You were lucky. You arrived safely"
|
||||
print "at Fort New York."
|
||||
else if p<=8 then
|
||||
for j in range(0,3); furs[j] = 0; end for
|
||||
print "You narrowly escaped an iroquois raiding party."
|
||||
print "However, you had to leave all your furs behind."
|
||||
else
|
||||
value[1] /= 2
|
||||
value[0] /= 2
|
||||
print "Your mink and beaver were damaged on your trip."
|
||||
print "You receive only half the current price for these furs."
|
||||
end if
|
||||
print "Supplies at New York cost $80.00."
|
||||
print "Your travel expenses to New York were $25.00."
|
||||
globals.money -= 80 + 25
|
||||
end if
|
||||
end function
|
||||
|
||||
printInstructions
|
||||
|
||||
gameOver = false
|
||||
money=600
|
||||
while not gameOver
|
||||
print "Do you wish to trade furs?"
|
||||
if getYesNo == "NO" then break
|
||||
|
||||
value[2]=floor((.15*rnd+.95)*100+.5)/100 // ermine value
|
||||
value[1]=floor((.25*rnd+1.00)*100+.5)/100 // beaver value
|
||||
|
||||
print
|
||||
print "You have $" + money + " savings."
|
||||
print "And 190 furs to begin the expedition."
|
||||
print
|
||||
print "Your 190 furs are distributed among the following"
|
||||
print "kinds of pelts: mink, beaver, ermine and fox."
|
||||
print
|
||||
furs = [0,0,0,0]
|
||||
for j in range(0, 3)
|
||||
furs[j] = input("How many " + furNames[j] + " do you have? ").val
|
||||
if furs.sum >= 190 then break
|
||||
end for
|
||||
if furs.sum > 190 then
|
||||
print "You may not have that many furs."
|
||||
print "Do not try to cheat. I can add."
|
||||
print "You must start again."
|
||||
continue
|
||||
end if
|
||||
|
||||
fort = pickFort
|
||||
visitFort fort
|
||||
if gameOver then break
|
||||
|
||||
print
|
||||
for j in [1, 3, 2, 0]
|
||||
if not furs[j] then continue
|
||||
revenue = value[j] * furs[j]
|
||||
print "Your " + furNames[j] + " sold for $" + revenue + "."
|
||||
money += revenue
|
||||
end for
|
||||
print
|
||||
print "You now have $" + money + " including your previous savings."
|
||||
end while
|
||||
|
||||
|
||||
16
00_Alternate_Languages/39_Golf/MiniScript/README.md
Normal file
16
00_Alternate_Languages/39_Golf/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript golf.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "golf"
|
||||
run
|
||||
303
00_Alternate_Languages/39_Golf/MiniScript/golf.ms
Normal file
303
00_Alternate_Languages/39_Golf/MiniScript/golf.ms
Normal file
@@ -0,0 +1,303 @@
|
||||
print " "*34 + "Golf"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
|
||||
print "Welcome to the creative computing country club,"
|
||||
print "an eighteen hole championship layout located a short"
|
||||
print "distance from scenic downtown Morristown. The"
|
||||
print "commentator will explain the game as you play."
|
||||
print "Enjoy your game; see you at the 19th hole..."
|
||||
print;print
|
||||
l = [0] * 11
|
||||
holesInCourse=18
|
||||
totalScore=0
|
||||
totalPar=0
|
||||
dubChance=.8
|
||||
s2=0
|
||||
curHole=1
|
||||
|
||||
|
||||
getHoleData = function(hole)
|
||||
// data for all the holes: distance, par, locOnLeft, and locOnRight for each one
|
||||
data = [
|
||||
361,4,4,2,389,4,3,3,206,3,4,2,500,5,7,2,
|
||||
408,4,2,4,359,4,6,4,424,4,4,2,388,4,4,4,
|
||||
196,3,7,2,400,4,7,2,560,5,7,2,132,3,2,2,
|
||||
357,4,4,4,294,4,2,4,475,5,2,3,375,4,4,2,
|
||||
180,3,6,2,550,5,6,6]
|
||||
i = (hole-1) * 4
|
||||
globals.distance = data[i]
|
||||
globals.par = data[i+1]
|
||||
globals.locOnRight = data[i+2]
|
||||
globals.locOnLeft = data[i+3]
|
||||
end function
|
||||
|
||||
startHole = function(hole)
|
||||
getHoleData hole
|
||||
print
|
||||
print "You are at the tee off hole " + hole + " distance " + distance + " yards, par " + par
|
||||
globals.totalPar += par
|
||||
print "On your right is ", ""
|
||||
printLocation locOnRight
|
||||
print "On your left is ", ""
|
||||
printLocation locOnLeft
|
||||
end function
|
||||
|
||||
// Get player's handicap
|
||||
while true
|
||||
handicap = input("What is your handicap? ").val
|
||||
if 0 <= handicap <= 30 then break
|
||||
print "PGA handicaps range from 0 to 30."
|
||||
end while
|
||||
|
||||
// Get player's weak point
|
||||
while true
|
||||
print "Difficulties at golf include:"
|
||||
print "0=hook, 1=slice, 2=poor distance, 3=trap shots, 4=putting"
|
||||
weakness = input("Which one (only one) is your worst? ").val
|
||||
if 0 <= weakness <= 4 then break
|
||||
end while
|
||||
|
||||
// End a sentence by printing the name of the given location
|
||||
printLocation = function(locIdx)
|
||||
if locIdx < 1 or locIdx > 6 then
|
||||
print "out of bounds."
|
||||
else
|
||||
print ["fairway.", "rough.", "trees.", "adjacent fairway.",
|
||||
"trap.", "water."][locIdx-1]
|
||||
end if
|
||||
end function
|
||||
|
||||
// Print score for one hole (plus total), and some praise or advice.
|
||||
printScore = function(hole, score, par, totalScore, totalPar)
|
||||
print "Your score on hole " + hole + " was " + score
|
||||
print "Total par for " + hole + " holes is " + totalPar + " Your total is " + totalScore
|
||||
if hole == holesInCourse then return
|
||||
if score > par+2 then
|
||||
print "Keep your head down."
|
||||
else if score == par then
|
||||
print "A par. Nice going."
|
||||
else if score == par-1 then
|
||||
print "A birdie."
|
||||
else if score == 1 then
|
||||
print "A hole in one."
|
||||
else if score == par-2 then
|
||||
print "A great big eagle."
|
||||
end if
|
||||
end function
|
||||
|
||||
// Print club advice -- but only once.
|
||||
clubAdviceGiven = false
|
||||
printClubAdvice = function
|
||||
if clubAdviceGiven then return // (already done)
|
||||
globals.clubAdviceGiven = true
|
||||
print "Selection of clubs"
|
||||
print "yardage desired suggested clubs"
|
||||
print "200 to 280 yards 1 to 4"
|
||||
print "100 to 200 yards 19 to 13"
|
||||
print " 0 to 100 yards 29 to 23"
|
||||
end function
|
||||
|
||||
doPenalty = function
|
||||
print "Penalty stroke assessed. Hit from previous location."
|
||||
globals.score += 1
|
||||
globals.j += 1
|
||||
globals.curLoc = 1
|
||||
globals.distance = prevDistance
|
||||
end function
|
||||
|
||||
// Try to get out of a trap. Return true if succeeded, false if failed.
|
||||
doTrapShot = function
|
||||
if weakness == 3 then
|
||||
if rnd <= dubChance then
|
||||
globals.dubChance *= 0.2
|
||||
print "Shot dubbed, still in trap."
|
||||
return false
|
||||
end if
|
||||
globals.dubChance = 0.8
|
||||
end if
|
||||
globals.distToPin = 1 + (3*floor((80/(40-handicap))*rnd))
|
||||
return true
|
||||
end function
|
||||
|
||||
getClub = function
|
||||
//print "DEBUG: getClub, with curLoc=" + curLoc
|
||||
while true
|
||||
club = input("What club do you choose? ").val
|
||||
print
|
||||
if club < 1 or club > 29 then continue
|
||||
if club > 4 and club < 12 then
|
||||
print "That club is not in the bag."
|
||||
continue
|
||||
end if
|
||||
if club >= 12 then club -= 6
|
||||
if curLoc <= 5 or club == 14 or club == 23 then break
|
||||
print "That club is not in the bag."
|
||||
print
|
||||
continue
|
||||
end while
|
||||
return club
|
||||
end function
|
||||
|
||||
getSwing = function(club)
|
||||
if club <= 13 then return 1 // (full swing)
|
||||
while true
|
||||
print "Now gauge your distance by a percentage (1 to 100)"
|
||||
swing = input("of a full swing? ").val / 100
|
||||
print
|
||||
if 0 <= swing <= 1 then return swing
|
||||
// Given an invalid swing input, the original BASIC code would
|
||||
// print "That club is not in the bag" and go back to choosing a club.
|
||||
// But that is convoluted spaghetti, and I'm not doing it.
|
||||
end while
|
||||
end function
|
||||
|
||||
playOneHole = function
|
||||
q = 0 // counts certain kinds of shots on every third hole (?)
|
||||
distanceHit = 0
|
||||
offLine = 0
|
||||
|
||||
// shot loop -- take as many shots as you need for this hole
|
||||
while true
|
||||
if curLoc < 1 then curLoc = 1
|
||||
if curLoc > 6 then
|
||||
print "Your shot went out of bounds."
|
||||
doPenalty
|
||||
distanceHit = 0
|
||||
else if curLoc > 5 then
|
||||
print "Your shot went into the water."
|
||||
doPenalty
|
||||
distanceHit = 0
|
||||
end if
|
||||
|
||||
if score > 0 and distanceHit then
|
||||
print "Shot went " + distanceHit + " yards. It's " + distToPin + " yards from the cup."
|
||||
print "Ball is " + floor(offLine) + " yards off line... in ", ""
|
||||
printLocation curLoc
|
||||
end if
|
||||
|
||||
printClubAdvice
|
||||
|
||||
club = getClub
|
||||
swing = getSwing(club)
|
||||
globals.score += 1
|
||||
if curLoc == 5 and not doTrapShot then continue
|
||||
if club > 14 then club -= 10
|
||||
|
||||
//print "DEBUG Club:"+club + " Swing:"+swing + " Weakness:"+weakness
|
||||
|
||||
if curHole % 3 == 0 then
|
||||
if s2 + q + (10*(curHole-1)/18) < (curHole-1)*(72+((handicap+1)/.85))/18 then
|
||||
q += 1
|
||||
if score % 2 and distance >= 95 then
|
||||
globals.distance -= 75
|
||||
distanceHit = 0
|
||||
print "Ball hit tree - bounced into rough " + distance + " yards from hole."
|
||||
continue
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
|
||||
if club >= 4 and curLoc == 2 then
|
||||
print "You dubbed it."
|
||||
distanceHit = 35
|
||||
else if score > 7 and distance < 200 then
|
||||
// user is really sucking, let's cut them a break
|
||||
putt 1 + (3 * floor((80/(40-handicap))*rnd))
|
||||
return
|
||||
else
|
||||
//print "DEBUG: SWING with handicap:" + handicap + " club:" + club
|
||||
distanceHit = floor(((30-handicap)*2.5+187-((30-handicap)*.25+15)*club/2)+25*rnd)
|
||||
distanceHit = floor(distanceHit*swing)
|
||||
if weakness == 2 then distanceHit = floor(.85*distanceHit)
|
||||
end if
|
||||
offLine = (rnd/.8)*(2*handicap+16)*abs(tan(distanceHit*.0035))
|
||||
distToPin = floor(sqrt(offLine^2+abs(distance-distanceHit)^2))
|
||||
//print "DEBUG distance:"+distance+"; distanceHit:"+distanceHit+"; distToPin:"+distToPin+"; offLine:"+offLine
|
||||
if distanceHit > distance and distToPin >= 20 then print "Too much club. You're past the hole."
|
||||
|
||||
globals.prevDistance = distance
|
||||
globals.distance = distToPin
|
||||
if distToPin > 27 then
|
||||
if offLine < 30 or j > 0 then
|
||||
curLoc = 1
|
||||
continue
|
||||
end if
|
||||
// hook or slice
|
||||
s9 = (s2+1)/15
|
||||
if weakness == 0 then
|
||||
isSlice = floor(s9) == s9
|
||||
else
|
||||
isSlice = not floor(s9) == s9
|
||||
end if
|
||||
if isSlice then
|
||||
print "You sliced- "
|
||||
curLoc = locOnRight
|
||||
else
|
||||
print "You hooked- "
|
||||
curLoc = locOnLeft
|
||||
end if
|
||||
if offLine > 45 then print "badly."
|
||||
|
||||
else if distToPin > 20 then
|
||||
curLoc = 5
|
||||
else if distToPin > .5 then
|
||||
globals.curLoc = 8 // on the green!
|
||||
putt distToPin * 3 // (convert yards to feet, and putt)
|
||||
return
|
||||
else
|
||||
curLoc = 9
|
||||
print "You holed it."
|
||||
print
|
||||
globals.curHole += 1
|
||||
return
|
||||
end if
|
||||
end while
|
||||
end function
|
||||
|
||||
putt = function(distToPin)
|
||||
puttAttempts = 0
|
||||
while true
|
||||
distToPin = abs(floor(distToPin))
|
||||
print "On green, " + distToPin + " feet from the pin."
|
||||
i = input("Choose your putt potency (1 to 13): ").val
|
||||
globals.score += 1
|
||||
if score+1 - par > handicap*0.072 + 2 or puttAttempts > 2 then break
|
||||
puttAttempts += 1
|
||||
if weakness == 4 then
|
||||
distToPin -= i*(4+1*rnd)+1
|
||||
else
|
||||
distToPin -= i*(4+2*rnd)+1.5
|
||||
end if
|
||||
if -2 <= distToPin <= 2 then break
|
||||
if distToPin < 0 then
|
||||
print "Passed by cup."
|
||||
else
|
||||
print "Putt short."
|
||||
end if
|
||||
end while
|
||||
print "You holed it."
|
||||
print
|
||||
return
|
||||
end function
|
||||
|
||||
// main loop
|
||||
while true
|
||||
curLoc = 0
|
||||
j = 0
|
||||
s2 += 1
|
||||
if curHole > 1 then
|
||||
end if
|
||||
|
||||
print
|
||||
|
||||
score = 0
|
||||
startHole curHole
|
||||
playOneHole
|
||||
|
||||
totalScore += score
|
||||
printScore curHole, score, par, totalScore, totalPar
|
||||
if curHole == holesInCourse then break
|
||||
|
||||
curHole += 1
|
||||
end while
|
||||
16
00_Alternate_Languages/40_Gomoko/MiniScript/README.md
Normal file
16
00_Alternate_Languages/40_Gomoko/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript gomoko.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "gomoko"
|
||||
run
|
||||
94
00_Alternate_Languages/40_Gomoko/MiniScript/gomoko.ms
Normal file
94
00_Alternate_Languages/40_Gomoko/MiniScript/gomoko.ms
Normal file
@@ -0,0 +1,94 @@
|
||||
print " "*33 + "Gomoku"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
print "Welcome to the Oriental game of Gomoko."
|
||||
print; print "The game is played on an N by N grid of a size"
|
||||
print "that you specify During your play, you may cover one grid"
|
||||
print "intersection with a marker. The object of the game is to get"
|
||||
print "5 adjacent markers in a row -- horizontally, vertically, or"
|
||||
print "diagonally. On the board diagram, your moves are marked"
|
||||
print "with a '1' and the computer moves with a '2'."
|
||||
print; print "The computer does not keep track of who has won."
|
||||
print "To end the game, type -1,-1 for your move."; print
|
||||
|
||||
inBounds = function(x,y)
|
||||
return 0 < x <= n and 0 < y <= n
|
||||
end function
|
||||
|
||||
empty = function(x,y)
|
||||
return A[x][y] == 0
|
||||
end function
|
||||
|
||||
printBoard = function
|
||||
for y in range(1,n)
|
||||
print A[y][1:n+1].join
|
||||
end for
|
||||
print
|
||||
end function
|
||||
|
||||
doPlayerMove = function
|
||||
while true
|
||||
inp = input("Your play (i,j)? ").replace(" ", "").split(",")
|
||||
print
|
||||
if inp.len != 2 then continue
|
||||
x = inp[0].val; y = inp[1].val
|
||||
if x == -1 then return false
|
||||
if not inBounds(x,y) then
|
||||
print "Illegal move. Try again..."
|
||||
else if not empty(x,y) then
|
||||
print "Square occupied. Try again..."
|
||||
else
|
||||
break
|
||||
end if
|
||||
end while
|
||||
A[x][y] = 1
|
||||
globals.lastPlayerMove = [x,y]
|
||||
return true
|
||||
end function
|
||||
|
||||
doComputerMove = function
|
||||
// Computer tries a move near the player's last move
|
||||
for e in range(-1,1)
|
||||
for f in range(-1,1)
|
||||
if e==0 and f==0 then continue
|
||||
x = lastPlayerMove[0] + e; y = lastPlayerMove[1] + f
|
||||
if inBounds(x,y) and empty(x,y) then
|
||||
A[x][y] = 2
|
||||
return
|
||||
end if
|
||||
end for
|
||||
end for
|
||||
|
||||
// Computer tries a random move
|
||||
while true
|
||||
x = floor(n * rnd + 1); y = floor(n * rnd + 1)
|
||||
if empty(x,y) then break
|
||||
end while
|
||||
A[x][y] = 2
|
||||
end function
|
||||
|
||||
playGame = function
|
||||
while true
|
||||
globals.n = input("What is your board size (min 7/ max 19)? ").val
|
||||
if 7 <= n <= 19 then break
|
||||
print "I said, the minimum is 7, the maximum is 19."
|
||||
end while
|
||||
globals.A = []
|
||||
for i in range(0,19)
|
||||
A.push [0]*20
|
||||
end for
|
||||
print; print "We alternate moves. You go first..."; print
|
||||
while true
|
||||
if not doPlayerMove then return
|
||||
doComputerMove
|
||||
printBoard
|
||||
end while
|
||||
end function
|
||||
|
||||
// Main loop
|
||||
while true
|
||||
playGame
|
||||
print; print "Thanks for the game!!"
|
||||
q = input("Play again (1 for Yes, 0 for No)? ").val
|
||||
if q != 1 then break
|
||||
end while
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript guess.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "guess"
|
||||
run
|
||||
|
||||
16
00_Alternate_Languages/42_Gunner/MiniScript/README.md
Normal file
16
00_Alternate_Languages/42_Gunner/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript gunner.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "gunner"
|
||||
run
|
||||
78
00_Alternate_Languages/42_Gunner/MiniScript/gunner.ms
Normal file
78
00_Alternate_Languages/42_Gunner/MiniScript/gunner.ms
Normal file
@@ -0,0 +1,78 @@
|
||||
print " "*30 + "Gunner"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
print "You are the officer-in-charge, giving orders to a gun"
|
||||
print "crew, telling them the degrees of elevation you estimate"
|
||||
print "will place a projectile on target. A hit within 100 yards"
|
||||
print "of the target will destroy it."; print
|
||||
|
||||
// Select a target and give the player up to 5 tries to hit it.
|
||||
// Return the number of shots taken, or set globals.gameOver to true.
|
||||
playOneTarget = function(maxRange)
|
||||
globals.gameOver = false
|
||||
targetDist = floor(maxRange * (.1 + .8 * rnd))
|
||||
shot = 0
|
||||
print "Distance to the target is " + targetDist + " yards."
|
||||
print
|
||||
while true
|
||||
print
|
||||
degrees = input("Elevation? ").val
|
||||
if degrees > 89 then
|
||||
print "Maximum elevation is 89 degrees."
|
||||
continue
|
||||
else if degrees < 1 then
|
||||
print "Minimum elevation is one degree."
|
||||
continue
|
||||
end if
|
||||
shot += 1
|
||||
if shot >= 6 then
|
||||
globals.gameOver = true
|
||||
return
|
||||
end if
|
||||
radiansX2 = 2 * degrees * pi/180
|
||||
throw = maxRange * sin(radiansX2)
|
||||
diff = floor(targetDist - throw)
|
||||
if abs(diff) < 100 then
|
||||
print "*** TARGET DESTROYED *** " + shot + " rounds of ammunition expended."
|
||||
return shot
|
||||
end if
|
||||
if diff > 0 then
|
||||
print "Short of target by " + diff + " yards."
|
||||
else
|
||||
print "Over target by " + abs(diff) + " yards."
|
||||
end if
|
||||
end while
|
||||
end function
|
||||
|
||||
playOneGame = function
|
||||
maxRange = floor(40000*rnd + 20000)
|
||||
print "Maximum range of your gun is " + maxRange + " yards."
|
||||
shots = 0
|
||||
for targetNum in range(1,4)
|
||||
shots += playOneTarget(maxRange)
|
||||
if gameOver then break
|
||||
if targetNum < 4 then
|
||||
print
|
||||
print "The forward observer has sighted more enemy activity..."
|
||||
end if
|
||||
end for
|
||||
if gameOver then
|
||||
print; print "Boom !!!! You have just been destroyed"
|
||||
print "by the enemy."; print; print; print
|
||||
else
|
||||
print; print; print "Total rounds expended were: " + shots
|
||||
end if
|
||||
if shots > 18 or gameOver then
|
||||
print "Better go back to font sill for refresher training!"
|
||||
else
|
||||
print "Nice shooting !!"
|
||||
end if
|
||||
end function
|
||||
|
||||
// Main loop
|
||||
while true
|
||||
playOneGame
|
||||
print; yn = input("Try again (Y or N)? ").upper
|
||||
if not yn or yn[0] != "Y" then break
|
||||
end while
|
||||
print; print "OK. Return to base camp."
|
||||
16
00_Alternate_Languages/43_Hammurabi/MiniScript/README.md
Normal file
16
00_Alternate_Languages/43_Hammurabi/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript hammurabi.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "hammurabi"
|
||||
run
|
||||
190
00_Alternate_Languages/43_Hammurabi/MiniScript/hammurabi.ms
Normal file
190
00_Alternate_Languages/43_Hammurabi/MiniScript/hammurabi.ms
Normal file
@@ -0,0 +1,190 @@
|
||||
print " "*32 + "Hamurabi"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
print "Try your hand at governing ancient Sumeria"
|
||||
print "for a ten-year term of office."; print
|
||||
|
||||
eol = char(10)
|
||||
|
||||
game = {}
|
||||
game.z = 0 // year
|
||||
game.p = 95
|
||||
game.s = 2800 // bushels in store
|
||||
game.h = 3000
|
||||
game.e = game.h - game.s // bushels eaten by rats
|
||||
game.food = 0 // bushels given to people to eat
|
||||
game.y = 3 // value (in bushels) per acre
|
||||
game.a = game.h / game.y // acres owned
|
||||
game.i = 5 // immigration/births
|
||||
game.d = 0 // how many starved this year
|
||||
game.d1 = 0 // total starved over the whole game
|
||||
game.p1 = 0 // average % of population starved per year
|
||||
game.q = 1 // if negative, then a plague strikes
|
||||
|
||||
startYear = function
|
||||
print; print; print "Hamurabi: I beg to report to you,"
|
||||
game.z += 1
|
||||
print "In year " + game.z + ", " +
|
||||
game.d + " people starved, " +
|
||||
game.i + " came to the city,"
|
||||
game.p += game.i
|
||||
if game.q < 0 then
|
||||
game.p = floor(game.p / 2)
|
||||
print "A horrible plague struck! Half the people died."
|
||||
end if
|
||||
print "Population is now " + game.p + "."
|
||||
print "The city now owns " + game.a + " acres."
|
||||
print "You harvested " + game.y + " bushels per acre."
|
||||
print "The rats ate " + game.e + " bushels."
|
||||
print "You now have " + game.s + " bushels in store."; print
|
||||
end function
|
||||
|
||||
exitGame = function
|
||||
print; print char(7)*10
|
||||
print "So long for now."; print
|
||||
exit
|
||||
end function
|
||||
|
||||
impeach = function
|
||||
print "Due to this extreme mismanagement you have not only"
|
||||
print "been impeached and thrown out of office but you have"
|
||||
print "also been declared national fink!!!!"
|
||||
exitGame
|
||||
end function
|
||||
|
||||
getNumber = function(prompt, max, maxMsg)
|
||||
while true
|
||||
value = input(prompt + "? ").val
|
||||
if value < 0 then
|
||||
print; print "Hamurabi: I cannot do what you wish."
|
||||
print "Get yourself another steward!"
|
||||
exitGame
|
||||
end if
|
||||
if value <= max then return value
|
||||
print "Hamurabi: Think again. " + maxMsg + " Now then,"
|
||||
end while
|
||||
end function
|
||||
|
||||
hint = function(msg)
|
||||
// This was not in the original program. But if you want to make
|
||||
// the game easier, uncomment this line:
|
||||
//print msg
|
||||
end function
|
||||
|
||||
min = function(a, b, c)
|
||||
m = [a, b, c]
|
||||
m.sort
|
||||
return m[0]
|
||||
end function
|
||||
|
||||
getDecisions = function
|
||||
// buy/sell land
|
||||
c = floor(10 * rnd); game.y = c + 17
|
||||
print "Land is trading at " + game.y + " bushels per acre."
|
||||
qty = getNumber("How many acres do you wish to buy",
|
||||
floor(game.s / game.y), "You have only" + eol + game.s + " bushels of grain.")
|
||||
if qty > 0 then
|
||||
game.a += qty
|
||||
game.s -= game.y * qty
|
||||
else
|
||||
qty = getNumber("How many acres do you wish to sell",
|
||||
game.a, "You own only" + eol + game.a + " acres.")
|
||||
game.a -= qty
|
||||
game.s += game.y * qty
|
||||
end if
|
||||
|
||||
// feed the people
|
||||
hint "Your people want " + (game.p * 20) + " bushels of food."
|
||||
game.food = getNumber("How many bushels do you wish to feed your people",
|
||||
game.s, "You have only" + eol + game.s + " bushels of grain.")
|
||||
game.s -= game.food
|
||||
|
||||
// planting (a little more complicate because there are THREE limits)
|
||||
hint "You can plant up to " +
|
||||
min(game.a, floor(game.s * 2), floor(game.p*10-1)) + " acres."
|
||||
game.d = 0
|
||||
while game.a > 0 and game.s > 2
|
||||
game.d = getNumber("How many acres do you wish to plant with seed",
|
||||
game.a, "You own only " + game.a + " acres.")
|
||||
// enough grain for seed? (each bushel can plant 2 acres)
|
||||
if floor(game.d / 2) > game.s then
|
||||
print "Hamurabi: Think again. You have only" + eol + game.s +
|
||||
" bushels of grain. Now then,"
|
||||
continue
|
||||
end if
|
||||
// enough people to tend the crops? (each person can tend 10 acres)
|
||||
if game.d >= game.p * 10 then
|
||||
print "But you have only " + game.p + " people to tend the fields! Now then,"
|
||||
continue
|
||||
end if
|
||||
break
|
||||
end while
|
||||
game.s -= floor(game.d / 2)
|
||||
end function
|
||||
|
||||
simulateYear = function
|
||||
// A bountiful harvest!
|
||||
c = floor(rnd * 5) + 1
|
||||
game.y = c; game.h = game.d * game.y; game.e = 0
|
||||
c = floor(rnd * 5) + 1
|
||||
if c % 2 == 0 then
|
||||
// rats are running wild!!
|
||||
game.e = floor(game.s / c)
|
||||
end if
|
||||
game.s += game.h - game.e
|
||||
|
||||
// Let's have some babies
|
||||
c = floor(rnd * 5) + 1
|
||||
game.i = floor(c * (20 * game.a + game.s) / game.p / 100 + 1)
|
||||
// How many people had full tummies?
|
||||
c = floor(game.food / 20)
|
||||
// Horros, a 15% chance of plague
|
||||
game.q = floor(10 * (2 * rnd - 0.3))
|
||||
|
||||
if game.p < c then
|
||||
game.d = 0
|
||||
else
|
||||
// starve enough for impeachment?
|
||||
game.d = game.p - c
|
||||
if game.d > 0.45 * game.p then
|
||||
print; print "You starved " + game.d + " people in one year!!!"
|
||||
impeach
|
||||
end if
|
||||
game.p1 = ((game.z - 1) * game.p1 + game.d * 100 / game.p) / game.z
|
||||
game.p = c
|
||||
game.d1 += game.d
|
||||
end if
|
||||
end function
|
||||
|
||||
printFinalResult = function
|
||||
print "In your 10-year term of office, " + game.p1 + " percent of the"
|
||||
print "population starved per year on the average, i.e., a total of"
|
||||
print game.d1 + " people died!!"
|
||||
acresPer = game.a / game.p
|
||||
print "You started with 10 acres per person and ended with"
|
||||
print acresPer + " acres per person."; print
|
||||
if game.p1 > 33 or acresPer < 7 then impeach
|
||||
if game.p1 > 10 or acresPer < 9 then
|
||||
print "Your heavy-handed performance smacks of Nero and Ivan IV."
|
||||
print "The people (remaining) find you an unpleasant ruler, and,"
|
||||
print "frankly, hate your guts!!"
|
||||
else if game.p1 > 3 or acresPer < 10 then
|
||||
print "Your performance could have been somewhat better, but"
|
||||
print "really wasn't too bad at all. " + floor(game.p * 0.8 * rnd) + " people"
|
||||
print "would dearly like to see you assassinated but we all have our"
|
||||
print "trivial problems."
|
||||
else
|
||||
print "A fantastic performance!! Charlemange, Disraeli, and"
|
||||
print "Jefferson combined could not have done better!"
|
||||
end if
|
||||
end function
|
||||
|
||||
// Main loop
|
||||
while true
|
||||
startYear
|
||||
if game.z == 11 then break
|
||||
getDecisions
|
||||
simulateYear
|
||||
end while
|
||||
printFinalResult
|
||||
exitGame
|
||||
@@ -1,119 +1,119 @@
|
||||
10 PRINT TAB(32);"HAMURABI"
|
||||
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
|
||||
30 PRINT:PRINT:PRINT
|
||||
10 PRINT TAB(32); "HAMURABI"
|
||||
20 PRINT TAB(15); "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
|
||||
30 PRINT : PRINT : PRINT
|
||||
80 PRINT "TRY YOUR HAND AT GOVERNING ANCIENT SUMERIA"
|
||||
90 PRINT "FOR A TEN-YEAR TERM OF OFFICE.":PRINT
|
||||
95 D1=0: P1=0
|
||||
100 Z=0: P=95:S=2800: H=3000: E=H-S
|
||||
110 Y=3: A=H/Y: I=5: Q=1
|
||||
210 D=0
|
||||
215 PRINT:PRINT:PRINT "HAMURABI: I BEG TO REPORT TO YOU,": Z=Z+1
|
||||
217 PRINT "IN YEAR";Z;",";D;"PEOPLE STARVED,";I;"CAME TO THE CITY,"
|
||||
218 P=P+I
|
||||
227 IF Q>0 THEN 230
|
||||
228 P=INT(P/2)
|
||||
90 PRINT "FOR A TEN-YEAR TERM OF OFFICE." : PRINT
|
||||
95 D1 = 0 : P1 = 0
|
||||
100 Z = 0 : P = 95 : S = 2800 : H = 3000 : E = H - S
|
||||
110 Y = 3 : A = H / Y : I = 5 : Q = 1
|
||||
210 D = 0
|
||||
215 PRINT : PRINT : PRINT "HAMURABI: I BEG TO REPORT TO YOU," : Z = Z + 1
|
||||
217 PRINT "IN YEAR "; Z; ","; D; " PEOPLE STARVED, "; I; " CAME TO THE CITY,"
|
||||
218 P = P + I
|
||||
227 IF Q > 0 THEN 230
|
||||
228 P = INT(P / 2)
|
||||
229 PRINT "A HORRIBLE PLAGUE STRUCK! HALF THE PEOPLE DIED."
|
||||
230 PRINT "POPULATION IS NOW";P
|
||||
232 PRINT "THE CITY NOW OWNS ";A;"ACRES."
|
||||
235 PRINT "YOU HARVESTED";Y;"BUSHELS PER ACRE."
|
||||
250 PRINT "THE RATS ATE";E;"BUSHELS."
|
||||
260 PRINT "YOU NOW HAVE ";S;"BUSHELS IN STORE.": PRINT
|
||||
270 IF Z=11 THEN 860
|
||||
310 C=INT(10*RND(1)): Y=C+17
|
||||
312 PRINT "LAND IS TRADING AT";Y;"BUSHELS PER ACRE."
|
||||
230 PRINT "POPULATION IS NOW "; P
|
||||
232 PRINT "THE CITY NOW OWNS "; A; " ACRES."
|
||||
235 PRINT "YOU HARVESTED "; Y; " BUSHELS PER ACRE."
|
||||
250 PRINT "THE RATS ATE "; E; " BUSHELS."
|
||||
260 PRINT "YOU NOW HAVE "; S; " BUSHELS IN STORE." : PRINT
|
||||
270 IF Z = 11 THEN 860
|
||||
310 C = INT(10 * RND(1)) : Y = C + 17
|
||||
312 PRINT "LAND IS TRADING AT "; Y; " BUSHELS PER ACRE."
|
||||
320 PRINT "HOW MANY ACRES DO YOU WISH TO BUY";
|
||||
321 INPUT Q: IF Q<0 THEN 850
|
||||
322 IF Y*Q<=S THEN 330
|
||||
321 INPUT Q : IF Q < 0 THEN 850
|
||||
322 IF Y * Q <= S THEN 330
|
||||
323 GOSUB 710
|
||||
324 GOTO 320
|
||||
330 IF Q=0 THEN 340
|
||||
331 A=A+Q: S=S-Y*Q: C=0
|
||||
330 IF Q = 0 THEN 340
|
||||
331 A = A + Q : S = S - Y * Q : C = 0
|
||||
334 GOTO 400
|
||||
340 PRINT "HOW MANY ACRES DO YOU WISH TO SELL";
|
||||
341 INPUT Q: IF Q<0 THEN 850
|
||||
342 IF Q<A THEN 350
|
||||
341 INPUT Q : IF Q < 0 THEN 850
|
||||
342 IF Q < A THEN 350
|
||||
343 GOSUB 720
|
||||
344 GOTO 340
|
||||
350 A=A-Q: S=S+Y*Q: C=0
|
||||
400 PRINT
|
||||
350 A = A - Q : S = S + Y * Q : C = 0
|
||||
400 PRINT
|
||||
410 PRINT "HOW MANY BUSHELS DO YOU WISH TO FEED YOUR PEOPLE";
|
||||
411 INPUT Q
|
||||
412 IF Q<0 THEN 850
|
||||
412 IF Q < 0 THEN 850
|
||||
418 REM *** TRYING TO USE MORE GRAIN THAN IS IN SILOS?
|
||||
420 IF Q<=S THEN 430
|
||||
420 IF Q <= S THEN 430
|
||||
421 GOSUB 710
|
||||
422 GOTO 410
|
||||
430 S=S-Q: C=1: PRINT
|
||||
430 S = S - Q : C = 1 : PRINT
|
||||
440 PRINT "HOW MANY ACRES DO YOU WISH TO PLANT WITH SEED";
|
||||
441 INPUT D: IF D=0 THEN 511
|
||||
442 IF D<0 THEN 850
|
||||
441 INPUT D : IF D = 0 THEN 511
|
||||
442 IF D < 0 THEN 850
|
||||
444 REM *** TRYING TO PLANT MORE ACRES THAN YOU OWN?
|
||||
445 IF D<=A THEN 450
|
||||
445 IF D <= A THEN 450
|
||||
446 GOSUB 720
|
||||
447 GOTO 440
|
||||
449 REM *** ENOUGH GRAIN FOR SEED?
|
||||
450 IF INT(D/2)<=S THEN 455
|
||||
450 IF INT(D / 2) <= S THEN 455
|
||||
452 GOSUB 710
|
||||
453 GOTO 440
|
||||
454 REM *** ENOUGH PEOPLE TO TEND THE CROPS?
|
||||
455 IF D<10*P THEN 510
|
||||
460 PRINT "BUT YOU HAVE ONLY";P;"PEOPLE TO TEND THE FIELDS! NOW THEN,"
|
||||
455 IF D < 10 * P THEN 510
|
||||
460 PRINT "BUT YOU HAVE ONLY "; P; " PEOPLE TO TEND THE FIELDS! NOW THEN,"
|
||||
470 GOTO 440
|
||||
510 S=S-INT(D/2)
|
||||
510 S = S - INT(D / 2)
|
||||
511 GOSUB 800
|
||||
512 REM *** A BOUNTIFUL HARVEST!
|
||||
515 Y=C: H=D*Y: E=0
|
||||
515 Y = C : H = D * Y : E = 0
|
||||
521 GOSUB 800
|
||||
522 IF INT(C/2)<>C/2 THEN 530
|
||||
522 IF INT(C / 2) <> C / 2 THEN 530
|
||||
523 REM *** RATS ARE RUNNING WILD!!
|
||||
525 E=INT(S/C)
|
||||
530 S=S-E+H
|
||||
525 E = INT(S / C)
|
||||
530 S = S - E + H
|
||||
531 GOSUB 800
|
||||
532 REM *** LET'S HAVE SOME BABIES
|
||||
533 I=INT(C*(20*A+S)/P/100+1)
|
||||
533 I = INT(C *(20 * A + S) / P / 100 + 1)
|
||||
539 REM *** HOW MANY PEOPLE HAD FULL TUMMIES?
|
||||
540 C=INT(Q/20)
|
||||
540 C = INT(Q / 20)
|
||||
541 REM *** HORROS, A 15% CHANCE OF PLAGUE
|
||||
542 Q=INT(10*(2*RND(1)-.3))
|
||||
550 IF P<C THEN 210
|
||||
542 Q = INT(10 *(2 * RND(1) - 0.3))
|
||||
550 IF P < C THEN 210
|
||||
551 REM *** STARVE ENOUGH FOR IMPEACHMENT?
|
||||
552 D=P-C: IF D>.45*P THEN 560
|
||||
553 P1=((Z-1)*P1+D*100/P)/Z
|
||||
555 P=C: D1=D1+D: GOTO 215
|
||||
560 PRINT: PRINT "YOU STARVED";D;"PEOPLE IN ONE YEAR!!!"
|
||||
552 D = P - C : IF D > 0.45 * P THEN 560
|
||||
553 P1 =((Z - 1) * P1 + D * 100 / P) / Z
|
||||
555 P = C : D1 = D1 + D : GOTO 215
|
||||
560 PRINT : PRINT "YOU STARVED "; D; " PEOPLE IN ONE YEAR!!!"
|
||||
565 PRINT "DUE TO THIS EXTREME MISMANAGEMENT YOU HAVE NOT ONLY"
|
||||
566 PRINT "BEEN IMPEACHED AND THROWN OUT OF OFFICE BUT YOU HAVE"
|
||||
567 PRINT "ALSO BEEN DECLARED NATIONAL FINK!!!!": GOTO 990
|
||||
567 PRINT "ALSO BEEN DECLARED NATIONAL FINK!!!!" : GOTO 990
|
||||
710 PRINT "HAMURABI: THINK AGAIN. YOU HAVE ONLY"
|
||||
711 PRINT S;"BUSHELS OF GRAIN. NOW THEN,"
|
||||
712 RETURN
|
||||
720 PRINT "HAMURABI: THINK AGAIN. YOU OWN ONLY";A;"ACRES. NOW THEN,"
|
||||
730 RETURN
|
||||
800 C=INT(RND(1)*5)+1
|
||||
801 RETURN
|
||||
850 PRINT: PRINT "HAMURABI: I CANNOT DO WHAT YOU WISH."
|
||||
711 PRINT S; "BUSHELS OF GRAIN. NOW THEN,"
|
||||
712 RETURN
|
||||
720 PRINT "HAMURABI: THINK AGAIN. YOU OWN ONLY "; A; " ACRES. NOW THEN,"
|
||||
730 RETURN
|
||||
800 C = INT(RND(1) * 5) + 1
|
||||
801 RETURN
|
||||
850 PRINT : PRINT "HAMURABI: I CANNOT DO WHAT YOU WISH."
|
||||
855 PRINT "GET YOURSELF ANOTHER STEWARD!!!!!"
|
||||
857 GOTO 990
|
||||
860 PRINT "IN YOUR 10-YEAR TERM OF OFFICE,";P1;"PERCENT OF THE"
|
||||
860 PRINT "IN YOUR 10-YEAR TERM OF OFFICE,"; P1; "PERCENT OF THE"
|
||||
862 PRINT "POPULATION STARVED PER YEAR ON THE AVERAGE, I.E. A TOTAL OF"
|
||||
865 PRINT D1;"PEOPLE DIED!!": L=A/P
|
||||
865 PRINT D1; "PEOPLE DIED!!" : L = A / P
|
||||
870 PRINT "YOU STARTED WITH 10 ACRES PER PERSON AND ENDED WITH"
|
||||
875 PRINT L;"ACRES PER PERSON.": PRINT
|
||||
880 IF P1>33 THEN 565
|
||||
885 IF L<7 THEN 565
|
||||
890 IF P1>10 THEN 940
|
||||
892 IF L<9 THEN 940
|
||||
895 IF P1>3 THEN 960
|
||||
896 IF L<10 THEN 960
|
||||
875 PRINT L; "ACRES PER PERSON." : PRINT
|
||||
880 IF P1 > 33 THEN 565
|
||||
885 IF L < 7 THEN 565
|
||||
890 IF P1 > 10 THEN 940
|
||||
892 IF L < 9 THEN 940
|
||||
895 IF P1 > 3 THEN 960
|
||||
896 IF L < 10 THEN 960
|
||||
900 PRINT "A FANTASTIC PERFORMANCE!!! CHARLEMANGE, DISRAELI, AND"
|
||||
905 PRINT "JEFFERSON COMBINED COULD NOT HAVE DONE BETTER!":GOTO 990
|
||||
905 PRINT "JEFFERSON COMBINED COULD NOT HAVE DONE BETTER!" : GOTO 990
|
||||
940 PRINT "YOUR HEAVY-HANDED PERFORMANCE SMACKS OF NERO AND IVAN IV."
|
||||
945 PRINT "THE PEOPLE (REMAINING) FIND YOU AN UNPLEASANT RULER, AND,"
|
||||
950 PRINT "FRANKLY, HATE YOUR GUTS!!":GOTO 990
|
||||
950 PRINT "FRANKLY, HATE YOUR GUTS!!" : GOTO 990
|
||||
960 PRINT "YOUR PERFORMANCE COULD HAVE BEEN SOMEWHAT BETTER, BUT"
|
||||
965 PRINT "REALLY WASN'T TOO BAD AT ALL. ";INT(P*.8*RND(1));"PEOPLE"
|
||||
965 PRINT "REALLY WASN'T TOO BAD AT ALL. "; INT(P * 0.8 * RND(1)); "PEOPLE"
|
||||
970 PRINT "WOULD DEARLY LIKE TO SEE YOU ASSASSINATED BUT WE ALL HAVE OUR"
|
||||
975 PRINT "TRIVIAL PROBLEMS."
|
||||
990 PRINT: FOR N=1 TO 10: PRINT CHR$(7);: NEXT N
|
||||
995 PRINT "SO LONG FOR NOW.": PRINT
|
||||
999 END
|
||||
990 PRINT : FOR N = 1 TO 10 : PRINT CHR$(7); : NEXT N
|
||||
995 PRINT "SO LONG FOR NOW." : PRINT
|
||||
999 END
|
||||
16
00_Alternate_Languages/44_Hangman/MiniScript/README.md
Normal file
16
00_Alternate_Languages/44_Hangman/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript hangman.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "hangman"
|
||||
run
|
||||
127
00_Alternate_Languages/44_Hangman/MiniScript/hangman.ms
Normal file
127
00_Alternate_Languages/44_Hangman/MiniScript/hangman.ms
Normal file
@@ -0,0 +1,127 @@
|
||||
print " "*32 + "Hangman"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
|
||||
words = []
|
||||
words += ["gum","sin","for","cry","lug","bye","fly"]
|
||||
words += ["ugly","each","from","work","talk","with","self"]
|
||||
words += ["pizza","thing","feign","fiend","elbow","fault","dirty"]
|
||||
words += ["budget","spirit","quaint","maiden","escort","pickax"]
|
||||
words += ["example","tension","quinine","kidney","replica","sleeper"]
|
||||
words += ["triangle","kangaroo","mahogany","sergeant","sequence"]
|
||||
words += ["moustache","dangerous","scientist","different","quiescent"]
|
||||
words += ["magistrate","erroneously","loudspeaker","phytotoxic"]
|
||||
words += ["matrimonial","parasympathomimetic","thigmotropism"]
|
||||
// Note: on Mini Micro, you could instead do:
|
||||
// words = file.readLines("/sys/data/englishWords.txt")
|
||||
|
||||
words.shuffle
|
||||
|
||||
addToPic = function(guessCount)
|
||||
if guessCount == 1 then
|
||||
print "First, we draw a head"
|
||||
ps[3][6]="-"; ps[3][7]="-"; ps[3][8]="-"; ps[4][5]="("; ps[4][6]="."
|
||||
ps[4][8]="."; ps[4][9]=")"; ps[5][6]="-"; ps[5][7]="-"; ps[5][8]="-"
|
||||
else if guessCount == 2 then
|
||||
print "Now we draw a body."
|
||||
for i in range(6, 9); ps[i][7]="x"; end for
|
||||
else if guessCount == 3 then
|
||||
print "Next we draw an arm."
|
||||
for i in range(4, 7); ps[i][i-1]="\"; end for
|
||||
else if guessCount == 4 then
|
||||
print "This time it's the other arm."
|
||||
ps[4][11]="/"; ps[5][10]="/"; ps[6][9]="/"; ps[7][8]="/"
|
||||
else if guessCount == 5 then
|
||||
print "Now, let's draw the right leg."
|
||||
ps[10][6]="/"; ps[11][5]="/"
|
||||
else if guessCount == 6 then
|
||||
print "This time we draw the left leg."
|
||||
ps[10][8]="\"; ps[11][9]="\"
|
||||
else if guessCount == 7 then
|
||||
print "Now we put up a hand."
|
||||
ps[3][11]="\"
|
||||
else if guessCount == 8 then
|
||||
print "Next the other hand."
|
||||
ps[3][3]="/"
|
||||
else if guessCount == 9 then
|
||||
print "Now we draw one foot"
|
||||
ps[12][10]="\"; ps[12][11]="-"
|
||||
else if guessCount == 10 then
|
||||
print "Here's the other foot -- you're hung!!"
|
||||
ps[12][3]="-"; ps[12][4]="/"
|
||||
end if
|
||||
for i in range(1, 12)
|
||||
print ps[i].join("")
|
||||
end for
|
||||
print
|
||||
end function
|
||||
|
||||
doOneGame = function
|
||||
usedLetters = []
|
||||
globals.ps = []
|
||||
for i in range(0, 12); ps.push [" "]*12; end for
|
||||
for i in range(1,12); ps[i][1] = "X"; end for
|
||||
for i in range(1, 7); ps[1][i] = "X"; end for; ps[2][7] = "X"
|
||||
secretWord = words.pull.upper
|
||||
print "(Secret word: " + secretWord + ")"
|
||||
visibleWord = ["-"] * secretWord.len
|
||||
wrongGuesses = 0
|
||||
while true
|
||||
print "Here are the letters you used:"
|
||||
print usedLetters.join(",")
|
||||
print
|
||||
print visibleWord.join("")
|
||||
print
|
||||
guess = input("What is your guess? ").upper
|
||||
guess = (guess + " ")[0]
|
||||
if guess < "A" or guess > "Z" then continue
|
||||
if usedLetters.indexOf(guess) != null then
|
||||
print "You guessed that letter before!"
|
||||
continue
|
||||
end if
|
||||
usedLetters.push guess
|
||||
for i in visibleWord.indexes
|
||||
if secretWord[i] == guess then visibleWord[i] = guess
|
||||
end for
|
||||
if visibleWord.indexOf("-") == null then
|
||||
print "You found the word!"
|
||||
return true
|
||||
else if secretWord.indexOf(guess) != null then
|
||||
print
|
||||
print visibleWord.join("")
|
||||
print
|
||||
guess = input("What is your guess for the word? ").upper
|
||||
if guess == secretWord then
|
||||
print "Right!! It took you " + usedLetters.len + " guesses!"
|
||||
return true
|
||||
else
|
||||
print "Wrong. Try another letter."
|
||||
end if
|
||||
print
|
||||
else
|
||||
print "Sorry, that letter isn't in the word."
|
||||
wrongGuesses += 1
|
||||
addToPic wrongGuesses
|
||||
if wrongGuesses > 9 then
|
||||
print "Sorry, you lose. The word was " + secretWord
|
||||
return false
|
||||
end if
|
||||
end if
|
||||
end while
|
||||
end function
|
||||
|
||||
while true
|
||||
if not words then
|
||||
print "You did all the words!!"
|
||||
break
|
||||
end if
|
||||
won = doOneGame
|
||||
if won then
|
||||
yn = input("Want another word? ").upper
|
||||
else
|
||||
yn = input("You missed that one. Do you want another word? ").upper
|
||||
end if
|
||||
if not yn or yn[0] != "Y" then break
|
||||
end while
|
||||
print
|
||||
print "It's been fun! Bye for now."
|
||||
16
00_Alternate_Languages/45_Hello/MiniScript/README.md
Normal file
16
00_Alternate_Languages/45_Hello/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript hello.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "hello"
|
||||
run
|
||||
108
00_Alternate_Languages/45_Hello/MiniScript/hello.ms
Normal file
108
00_Alternate_Languages/45_Hello/MiniScript/hello.ms
Normal file
@@ -0,0 +1,108 @@
|
||||
print " "*33 + "Hello"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
|
||||
print "Hello. My name is Creative Computer."
|
||||
print
|
||||
print
|
||||
ns = input("What's your name? ")
|
||||
print
|
||||
print "Hi there, " + ns + ", are you enjoying yourself here?"
|
||||
while true
|
||||
bs = input.lower
|
||||
print
|
||||
if bs == "yes" then
|
||||
print "I'm glad to hear that, " + ns + "."
|
||||
print
|
||||
break
|
||||
else if bs == "no" then
|
||||
print "Oh, I'm sorry to hear that, " + ns + ". Maybe we can"
|
||||
print "brighten up your visit a bit."
|
||||
break
|
||||
else
|
||||
print "Please answer 'yes' or 'no'. Do you like it here?"
|
||||
end if
|
||||
end while
|
||||
print
|
||||
print "Say, " + ns + ", I can solve all kinds of problems except"
|
||||
print "those dealing with Greece. What kind of problems do"
|
||||
print "you have (answer sex, health, money, or job)?"
|
||||
while true
|
||||
cs = input
|
||||
print
|
||||
if cs != "sex" and cs != "health" and cs != "money" and cs != "job" then
|
||||
print "Oh, " + ns + ", your answer of " + cs + " is Greek to me."
|
||||
else if cs == "job" then
|
||||
print "I can sympathize with you " + ns + ". I have to work"
|
||||
print "very long hours for no pay -- and some of my bosses"
|
||||
print "really beat on my keyboard. My advice to you, " + ns + ","
|
||||
print "is to open a retail computer store. It's great fun."
|
||||
else if cs == "money" then
|
||||
print "Sorry, " + ns + ", I'm broke too. Why don't you sell"
|
||||
print "encyclopeadias or marry someone rich or stop eating"
|
||||
print "so you won't need so much money?"
|
||||
else if cs == "health" then
|
||||
print "My advice to you " + ns + " is:"
|
||||
print " 1. Take two asprin"
|
||||
print " 2. Drink plenty of fluids (orange juice, not beer!)"
|
||||
print " 3. Go to bed (alone)"
|
||||
else
|
||||
print "Is your problem too much or too little?"
|
||||
while true
|
||||
ds = input.lower
|
||||
print
|
||||
if ds == "too much" then
|
||||
print "You call that a problem?!! I should have such problems!"
|
||||
print "If it bothers you, " + ns + ", take a cold shower."
|
||||
break
|
||||
else if ds == "too little" then
|
||||
print "Why are you here in suffern, " + ns + "? You should be"
|
||||
print "in Tokyo or New York or Amsterdam or someplace with some"
|
||||
print "real action."
|
||||
break
|
||||
else
|
||||
print "Don't get all shook, " + ns + ", just answer the question"
|
||||
print "with 'too much' or 'too little'. Which is it?"
|
||||
end if
|
||||
end while
|
||||
end if
|
||||
print
|
||||
print "Any more problems you want solved, " + ns + "?"
|
||||
es = input.lower
|
||||
print
|
||||
if es == "yes" then
|
||||
print "What kind (sex, money, health, job)?"
|
||||
else if es == "no" then
|
||||
print "That will be $5.00 for the advice, " + ns + "."
|
||||
print "Please leave the money on the terminal."
|
||||
print
|
||||
wait 2
|
||||
print
|
||||
print
|
||||
while true
|
||||
gs = input("Did you leave the money? ").lower
|
||||
print
|
||||
if gs == "yes" then
|
||||
print "Hey, " + ns + "??? You left no money at all!"
|
||||
print "You are cheating me out of my hard-earned living."
|
||||
print
|
||||
print "What a rip off, " + ns + "!!!"
|
||||
print
|
||||
break
|
||||
else if gs == "no" then
|
||||
print "That's honest, " + ns + ", but how do you expect"
|
||||
print "me to go on with my psychology studies if my patient"
|
||||
print "don't pay their bills?"
|
||||
break
|
||||
else
|
||||
print "Your answer of '" + gs + "' confuses me, " + ns + "."
|
||||
print "Please respond with 'yes' or 'no'."
|
||||
end if
|
||||
end while
|
||||
break
|
||||
end if
|
||||
end while
|
||||
print
|
||||
print "Take a walk, " + ns + "."
|
||||
print
|
||||
print
|
||||
16
00_Alternate_Languages/46_Hexapawn/MiniScript/README.md
Normal file
16
00_Alternate_Languages/46_Hexapawn/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript hexapawn.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "hexapawn"
|
||||
run
|
||||
266
00_Alternate_Languages/46_Hexapawn/MiniScript/hexapawn.ms
Normal file
266
00_Alternate_Languages/46_Hexapawn/MiniScript/hexapawn.ms
Normal file
@@ -0,0 +1,266 @@
|
||||
print " "*32 + "Hexapawn"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
|
||||
// Hexapawn: interpretation of hexapawn game as presented in
|
||||
// Martin Gardner's "The Unexpected Hanging and Other Mathematic-
|
||||
// al Diversions", chapter eight: A Matchbox Game-Learning Machine
|
||||
// Original version for H-P timeshare system by reversed.A. Kaapke 5/5/76
|
||||
// Instructions by jeff dalton
|
||||
// Conversion to MITS BASIC by Steve North
|
||||
// Conversion to MiniScript by Joe Strout
|
||||
|
||||
// All 19 possible board positions:
|
||||
ba = [null,
|
||||
[null,-1,-1,-1,1,0,0,0,1,1],
|
||||
[null,-1,-1,-1,0,1,0,1,0,1],
|
||||
[null,-1,0,-1,-1,1,0,0,0,1],
|
||||
[null,0,-1,-1,1,-1,0,0,0,1],
|
||||
[null,-1,0,-1,1,1,0,0,1,0],
|
||||
[null,-1,-1,0,1,0,1,0,0,1],
|
||||
[null,0,-1,-1,0,-1,1,1,0,0],
|
||||
[null,0,-1,-1,-1,1,1,1,0,0],
|
||||
[null,-1,0,-1,-1,0,1,0,1,0],
|
||||
[null,0,-1,-1,0,1,0,0,0,1],
|
||||
[null,0,-1,-1,0,1,0,1,0,0],
|
||||
[null,-1,0,-1,1,0,0,0,0,1],
|
||||
[null,0,0,-1,-1,-1,1,0,0,0],
|
||||
[null,-1,0,0,1,1,1,0,0,0],
|
||||
[null,0,-1,0,-1,1,1,0,0,0],
|
||||
[null,-1,0,0,-1,-1,1,0,0,0],
|
||||
[null,0,0,-1,-1,1,0,0,0,0],
|
||||
[null,0,-1,0,1,-1,0,0,0,0],
|
||||
[null,-1,0,0,-1,1,0,0,0,0]]
|
||||
|
||||
// Possible responses for each board position (move from x to y,
|
||||
// represented as x*10 + y):
|
||||
ma = [null,
|
||||
[null,24,25,36,0],
|
||||
[null,14,15,36,0],
|
||||
[null,15,35,36,47],
|
||||
[null,36,58,59,0],
|
||||
[null,15,35,36,0],
|
||||
[null,24,25,26,0],
|
||||
[null,26,57,58,0],
|
||||
[null,26,35,0,0],
|
||||
[null,47,48,0,0],
|
||||
[null,35,36,0,0],
|
||||
[null,35,36,0,0],
|
||||
[null,36,0,0,0],
|
||||
[null,47,58,0,0],
|
||||
[null,15,0,0,0],
|
||||
[null,26,47,0,0],
|
||||
[null,47,58,0,0],
|
||||
[null,35,36,47,0],
|
||||
[null,28,58,0,0],
|
||||
[null,15,47,0,0]]
|
||||
s = [0]*10
|
||||
t = [0]*10
|
||||
|
||||
showBoard = function
|
||||
print
|
||||
for i in [1,2,3]
|
||||
print " "*10, ""
|
||||
for j in [1,2,3]
|
||||
print "X.O"[s[(i - 1) * 3 + j] + 1], ""
|
||||
end for
|
||||
print
|
||||
end for
|
||||
end function
|
||||
|
||||
mirror = function(x)
|
||||
return [null, 3,2,1, 6,5,4, 9,8,7][x]
|
||||
end function
|
||||
|
||||
mirrorBoard = function(b)
|
||||
return [null, b[3],b[2],b[1], b[6],b[5],b[4], b[9],b[8],b[7]]
|
||||
end function
|
||||
|
||||
intro = function
|
||||
while true
|
||||
s = input("Instructions (Y-N)? ").lower
|
||||
if s then s = s[0]
|
||||
if s == "n" then return
|
||||
if s == "y" then break
|
||||
end while
|
||||
print
|
||||
print "This program plays the game of Hexapawn."
|
||||
print "Hexapawn is played with Chess pawns on a 3 by 3 board."
|
||||
print "The pawns are moved as in Chess - one space forward to"
|
||||
print "an empty space or one space forward and diagonally to"
|
||||
print "capture an opposing man. On the board, your pawns"
|
||||
print "are 'O', the computer's pawns are 'X', and empty "
|
||||
print "squares are '.'. To enter a move, type the number of"
|
||||
print "the square you are moving from, followed by the number"
|
||||
print "of the square you will move to. The numbers must be"
|
||||
print "seperated by a comma."
|
||||
print
|
||||
input "(Press Return.)"
|
||||
print
|
||||
print "The computer starts a series of games knowing only when"
|
||||
print "the game is won (a draw is impossible) and how to move."
|
||||
print "It has no strategy at first and just moves randomly."
|
||||
print "However, it learns from each game. Thus, winning becomes"
|
||||
print "more and more difficult. Also, to help offset your"
|
||||
print "initial advantage, you will not be told how to win the"
|
||||
print "game but must learn this by playing."
|
||||
print
|
||||
print "The numbering of the board is as follows:"
|
||||
print " "*10 + "123"
|
||||
print " "*10 + "456"
|
||||
print " "*10 + "789"
|
||||
print
|
||||
print "For example, to move your rightmost pawn forward,"
|
||||
print "you would type 9,6 in response to the question"
|
||||
print "'Your move?'. Since I'm a good sport, you'll always"
|
||||
print "go first."
|
||||
print
|
||||
end function
|
||||
|
||||
getMove = function
|
||||
while true
|
||||
inp = input("Your move? ").replace(",", " ").split
|
||||
if inp.len > 1 then
|
||||
m1 = inp[0].val
|
||||
m2 = inp[-1].val
|
||||
if 0 < m1 < 10 and 0 < m2 < 10 then
|
||||
if s[m1] != 1 or s[m2] == 1 or
|
||||
(m2 - m1 != -3 and s[m2] != -1) or
|
||||
(m2 > m1) or (m2 - m1 == -3 and s[m2] != 0) or
|
||||
(m2 - m1 < -4) or (m1 == 7 and m2 == 3) then
|
||||
print "Illegal move."
|
||||
continue
|
||||
end if
|
||||
return [m1, m2]
|
||||
end if
|
||||
end if
|
||||
print "Illegal co-ordinates."
|
||||
end while
|
||||
end function
|
||||
|
||||
// Find the current board number (1-19) and whether it is mirrored.
|
||||
findBoardNum = function
|
||||
idx = ba.indexOf(s)
|
||||
if idx != null then return [idx, false]
|
||||
idx = ba.indexOf(mirrorBoard(s))
|
||||
if idx != null then return [idx, true]
|
||||
return null
|
||||
end function
|
||||
|
||||
// Main program
|
||||
intro
|
||||
wins = 0
|
||||
losses = 0
|
||||
while true
|
||||
s = [null, -1,-1,-1, 0,0,0, 1,1,1]
|
||||
computerWins = false
|
||||
showBoard
|
||||
while true
|
||||
// Input player's move
|
||||
userMove = getMove
|
||||
m1 = userMove[0]; m2 = userMove[1]
|
||||
|
||||
// Move player's pawn
|
||||
s[m1] = 0
|
||||
s[m2] = 1
|
||||
showBoard
|
||||
|
||||
// If no computer pawns, or player reached top, then computer loses
|
||||
if s.indexOf(-1) == null or s[1] == 1 or s[2] == 1 or s[3] == 1 then
|
||||
break
|
||||
end if
|
||||
// Ensure at least one computer pawn with valid move.
|
||||
// (Note: original BASIC code for this had several bugs; the code
|
||||
// below should be more correct.)
|
||||
anyValidMove = false
|
||||
for i in range(1, 6) // (no sense checking position 7-9)
|
||||
if s[i] != -1 then continue
|
||||
// check for a straight-ahead move
|
||||
if s[i + 3] == 0 then anyValidMove = true
|
||||
// check for a capture
|
||||
if i == 2 or i == 5 then
|
||||
if s[i+2] == 1 or s[i+4] == 1 then anyValidMove = true
|
||||
else if i == 1 or i == 4 then
|
||||
if s[i+4] == 1 then anyValidMove = true
|
||||
else
|
||||
if s[i+2] == 1 then anyValidMove = true
|
||||
end if
|
||||
end for
|
||||
if not anyValidMove then break
|
||||
|
||||
boardAndReversed = findBoardNum
|
||||
if boardAndReversed == null then
|
||||
print "Illegal board pattern" // (should never happen in normal play)
|
||||
break
|
||||
end if
|
||||
x = boardAndReversed[0]; reversed = boardAndReversed[1]
|
||||
|
||||
// Select a random move for board X, as permitted by our memory
|
||||
possibilities = []
|
||||
for i in range(1, 4)
|
||||
if ma[x][i] != 0 then possibilities.push i
|
||||
end for
|
||||
|
||||
// For more insight into how the computer learns, uncomment this line:
|
||||
//print "Considering for board " + x + ": " + possibilities + " (reversed=" + reversed + ")"
|
||||
if not possibilities then
|
||||
print "I resign."
|
||||
break
|
||||
end if
|
||||
possibilities.shuffle
|
||||
y = possibilities[0]
|
||||
|
||||
m1 = floor(ma[x][y] / 10)
|
||||
m2 = ma[x][y] % 10
|
||||
if reversed then
|
||||
m1 = mirror(m1)
|
||||
m2 = mirror(m2)
|
||||
end if
|
||||
|
||||
// Announce move
|
||||
print "I move from " + m1 + " to " + m2
|
||||
s[m1] = 0
|
||||
s[m2] = -1
|
||||
showBoard
|
||||
|
||||
// Finish if computer reaches bottom, or no player pawns are left
|
||||
if s[7] == -1 or s[8] == -1 or s[9] == -1 or s.indexOf(1) == null then
|
||||
computerWins = true
|
||||
break
|
||||
end if
|
||||
|
||||
// Finish if player cannot move
|
||||
playerCanMove = false
|
||||
for i in range(1, 9)
|
||||
if s[i] != 1 then continue
|
||||
if i > 3 and s[i - 3] == 0 then playerCanMove = true
|
||||
if mirror(i) != i then
|
||||
if i >= 7 then
|
||||
if s[5] == -1 then playerCanMove = true
|
||||
else
|
||||
if s[2] == -1 then playerCanMove = true
|
||||
end if
|
||||
else
|
||||
if s[i - 2] == -1 or s[i - 4] == -1 then playerCanMove = true
|
||||
end if
|
||||
end for
|
||||
if not playerCanMove then
|
||||
print "You can't move, so ", ""
|
||||
computerWins = true
|
||||
break
|
||||
end if
|
||||
end while
|
||||
if computerWins then
|
||||
print "I win."
|
||||
wins += 1
|
||||
else
|
||||
print "You win"
|
||||
// Because we lost, clear out the last response used, so that we don't
|
||||
// make the same mistake again. This is how the computer learns!
|
||||
ma[x][y] = 0
|
||||
losses += 1
|
||||
end if
|
||||
print "I have won " + wins + " and you " + losses + " out of " + (losses + wins) + " games."
|
||||
print
|
||||
wait 2
|
||||
end while
|
||||
19
00_Alternate_Languages/47_Hi-Lo/MiniScript/README.md
Normal file
19
00_Alternate_Languages/47_Hi-Lo/MiniScript/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
0. Try-It! Page:
|
||||
Go to https://miniscript.org/tryit/, clear the sample code from the code editor, and paste in the contents of hi-lo.ms. Then click the "Run Script" button. Program output (and input) will appear in the green-on-black terminal display to the right of or below the code editor.
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript hi-lo.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "hi-lo"
|
||||
run
|
||||
41
00_Alternate_Languages/47_Hi-Lo/MiniScript/hi-lo.ms
Normal file
41
00_Alternate_Languages/47_Hi-Lo/MiniScript/hi-lo.ms
Normal file
@@ -0,0 +1,41 @@
|
||||
print " "*34 + "Hi Lo"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
print "This is the game of hi lo."; print
|
||||
print "You will have 6 tries to guess the amount of money in the"
|
||||
print "hi lo jackpot, which is between 1 and 100 dollars. If you"
|
||||
print "guess the amount, you win all the money in the jackpot!"
|
||||
print "Then you get another chance to win more money. However,"
|
||||
print "if you do not guess the amount, the game ends."; print
|
||||
total = 0
|
||||
while true
|
||||
guesses=0
|
||||
print
|
||||
number=floor(100*rnd)
|
||||
while true
|
||||
guess = input("Your guess? ").val
|
||||
guesses += 1
|
||||
if guess < number then
|
||||
print "Your guess is too low."
|
||||
else if guess > number then
|
||||
print "Your guess is too high."
|
||||
else
|
||||
print "Got it!!!!!!!!!! You win " + number + " dollars."
|
||||
total += number
|
||||
print "Your total winnings are now " + total + " dollars."
|
||||
break
|
||||
end if
|
||||
if guesses >= 6 then
|
||||
print "You blew it...too bad...the number was " + number
|
||||
total = 0
|
||||
break
|
||||
end if
|
||||
end while
|
||||
|
||||
print
|
||||
yn = input("Play again (yes or no)?").lower
|
||||
if not yn or yn[0] != "y" then break
|
||||
end while
|
||||
|
||||
print
|
||||
print "So long. Hope you enjoyed yourself!!!"
|
||||
16
00_Alternate_Languages/48_High_IQ/MiniScript/README.md
Normal file
16
00_Alternate_Languages/48_High_IQ/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript highiq.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "highiq"
|
||||
run
|
||||
163
00_Alternate_Languages/48_High_IQ/MiniScript/highiq.ms
Normal file
163
00_Alternate_Languages/48_High_IQ/MiniScript/highiq.ms
Normal file
@@ -0,0 +1,163 @@
|
||||
print " "*33 + "H-I-Q"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
print "Here is the board:"; print
|
||||
|
||||
print " ! ! !"
|
||||
print " 13 14 15"; print
|
||||
print " ! ! !"
|
||||
print " 22 23 24"; print
|
||||
print "! ! ! ! ! ! !"
|
||||
print "29 30 31 32 33 34 35"; print
|
||||
print "! ! ! ! ! ! !"
|
||||
print "38 39 40 41 42 43 44"; print
|
||||
print "! ! ! ! ! ! !"
|
||||
print "47 48 49 50 51 52 53"; print
|
||||
print " ! ! !"
|
||||
print " 58 59 60"; print
|
||||
print " ! ! !"
|
||||
print " 67 68 69"; print
|
||||
print "To save typing time, a compressed version of the game board"
|
||||
print "will be used during play. Refer to the above one for peg"
|
||||
input "numbers. Press Return to begin."
|
||||
print
|
||||
|
||||
// Prepare the board (t): a 9x9 2D array, with 5 for pins,
|
||||
// -5 for invalid (no hole) positions, and 0 for empty holes.
|
||||
// Also prepare the pinToPos map, which maps pin numbers to
|
||||
// [row, column] positions.
|
||||
setupBoard = function
|
||||
globals.t = [[-5]*10]
|
||||
globals.pinToPos = {}
|
||||
pinNums = [13,14,15,22,23,24,29,30,31,32,33,34,35,38,39,40,41,
|
||||
42,43,44,47,48,49,50,51,52,53,58,59,60,67,68,69]
|
||||
for row in range(1,9)
|
||||
t.push [-5]*10
|
||||
for col in range(1,9)
|
||||
if row < 2 or row > 8 or col < 2 or col > 8 or
|
||||
((row < 4 or row > 6) and (col < 4 or col > 6)) then
|
||||
t[row][col] = -5
|
||||
else
|
||||
t[row][col] = 5
|
||||
pinToPos[pinNums.pull] = [row,col]
|
||||
end if
|
||||
end for
|
||||
end for
|
||||
t[5][5] = 0
|
||||
end function
|
||||
|
||||
printBoard = function
|
||||
for x in range(1,9)
|
||||
s = ""
|
||||
for y in range(1,9)
|
||||
if t[x][y] < 0 then
|
||||
s += " "
|
||||
else if t[x][y] == 0 then
|
||||
s += " o"
|
||||
else
|
||||
s += " !"
|
||||
end if
|
||||
end for
|
||||
print s
|
||||
end for
|
||||
end function
|
||||
|
||||
isPin = function(pinNum)
|
||||
if not pinToPos.hasIndex(pinNum) then return false
|
||||
pos = pinToPos[pinNum]
|
||||
return t[pos[0]][pos[1]] == 5
|
||||
end function
|
||||
|
||||
isHole = function(pinNum)
|
||||
if not pinToPos.hasIndex(pinNum) then return false
|
||||
pos = pinToPos[pinNum]
|
||||
return t[pos[0]][pos[1]] == 0
|
||||
end function
|
||||
|
||||
isValidJump = function(pinFrom, pinTo)
|
||||
if not pinToPos.hasIndex(pinFrom) then return false
|
||||
posFrom = pinToPos[pinFrom]
|
||||
if not isHole(pinTo) then return false
|
||||
posTo = pinToPos[pinTo]
|
||||
// check that the Manhattan distance is exactly 2
|
||||
dist = abs(posFrom[0] - posTo[0]) + abs(posFrom[1] - posTo[1])
|
||||
if dist != 2 then return false
|
||||
// and check that the intervening position contains a pin
|
||||
if t[(posFrom[0]+posTo[0])/2][(posFrom[1]+posTo[1])/2] != 5 then return false
|
||||
return true
|
||||
end function
|
||||
|
||||
// Check if the game is over (player has no legal moves).
|
||||
// Return true if over, false if there are legal moves yet.
|
||||
checkGameOver = function
|
||||
for row in range(2,8)
|
||||
for col in range(2,8)
|
||||
fromPin = pinToPos.indexOf([row,col])
|
||||
if fromPin == null or not isPin(fromPin) then continue
|
||||
for r2 in [row-2, row+2]
|
||||
toPin = pinToPos.indexOf([r2,col])
|
||||
if toPin == null then continue
|
||||
if isValidJump(fromPin, toPin) then return false
|
||||
end for
|
||||
for c2 in [col-2, col+2]
|
||||
toPin = pinToPos.indexOf([row,c2])
|
||||
if toPin == null then continue
|
||||
if isValidJump(fromPin, toPin) then return false
|
||||
end for
|
||||
end for
|
||||
end for
|
||||
return true // no legal moves found, so game over
|
||||
end function
|
||||
|
||||
// Get the user's move, returning [[fromRow,fromCol], [toRow,toCol]].
|
||||
// (Check legality and return only legal moves.)
|
||||
getMove = function
|
||||
print
|
||||
while true
|
||||
fromNum = input("Move which piece? ").val
|
||||
if isPin(fromNum) then toNum = input("To where? ").val else toNum = 0
|
||||
if isHole(toNum) and isValidJump(fromNum, toNum) then break
|
||||
print "Illegal move, try again..."
|
||||
end while
|
||||
return [pinToPos[fromNum], pinToPos[toNum]]
|
||||
end function
|
||||
|
||||
// Get the user's move, and update the board accordingly.
|
||||
doOneMove = function
|
||||
move = getMove
|
||||
fromRow = move[0][0]; fromCol = move[0][1]
|
||||
toRow = move[1][0]; toCol = move[1][1]
|
||||
t[fromRow][fromCol] = 0
|
||||
t[toRow][toCol] = 5
|
||||
t[(fromRow+toRow)/2][(fromCol+toCol)/2] = 0
|
||||
end function
|
||||
|
||||
// Main program
|
||||
while true
|
||||
setupBoard
|
||||
printBoard
|
||||
while true
|
||||
doOneMove
|
||||
print
|
||||
printBoard
|
||||
if checkGameOver then break
|
||||
end while
|
||||
print; print "The game is over."
|
||||
pinsLeft = 0
|
||||
for a in t
|
||||
for b in a
|
||||
if b == 5 then pinsLeft += 1
|
||||
end for
|
||||
end for
|
||||
print "You had " + pinsLeft + " pieces remaining."
|
||||
if pinsLeft == 1 then
|
||||
print "Bravo! You made a perfect score!"
|
||||
print "Save this paper as a record of your accomplishment!"
|
||||
end if
|
||||
print
|
||||
yn = input("Play again (yes or no)? ").lower
|
||||
if yn and yn[0] == "n" then break
|
||||
end while
|
||||
print; print "So long for now."; print
|
||||
|
||||
|
||||
16
00_Alternate_Languages/49_Hockey/MiniScript/README.md
Normal file
16
00_Alternate_Languages/49_Hockey/MiniScript/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
|
||||
|
||||
Conversion to [MiniScript](https://miniscript.org).
|
||||
|
||||
Ways to play:
|
||||
|
||||
1. Command-Line MiniScript:
|
||||
Download for your system from https://miniscript.org/cmdline/, install, and then run the program with a command such as:
|
||||
|
||||
miniscript hockey.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "hockey"
|
||||
run
|
||||
396
00_Alternate_Languages/49_Hockey/MiniScript/hockey.ms
Normal file
396
00_Alternate_Languages/49_Hockey/MiniScript/hockey.ms
Normal file
@@ -0,0 +1,396 @@
|
||||
print " "*33 + "Hockey"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
// ROBERT PUOPOLO ALG. 1 140 MCCOWAN 6/7/73 HOCKEY
|
||||
|
||||
getYesNo = function(prompt)
|
||||
while true
|
||||
yn = input(prompt + "? ").lower
|
||||
if yn and yn[0] == "y" then return "yes"
|
||||
if yn and yn[0] == "n" then return "no"
|
||||
print "Answer yes or no!!"
|
||||
end while
|
||||
end function
|
||||
|
||||
getTwoStrings = function(prompt)
|
||||
s = input(prompt + "? ").replace(", ", ",").split(",")
|
||||
answer1 = s[0]
|
||||
if s.len < 2 then
|
||||
answer2 = input("?? ")
|
||||
else
|
||||
answer2 = s[1]
|
||||
end if
|
||||
return [answer1, answer2]
|
||||
end function
|
||||
|
||||
getNumber = function(prompt, minVal = 1, maxVal = 999)
|
||||
while true
|
||||
num = input(prompt + "? ").val
|
||||
if minVal <= num <= maxVal then return num
|
||||
end while
|
||||
end function
|
||||
|
||||
printWithTab = function(s)
|
||||
print s.replace("\t", char(9))
|
||||
end function
|
||||
|
||||
ha = [0] * 21
|
||||
ta = [0] * 6
|
||||
t1 = [0] * 6
|
||||
t2 = [0] * 6
|
||||
t3 = [0] * 6
|
||||
aNames = [""] * 8 // Team 1 player names and team name
|
||||
bNames = [""] * 8 // Team 2 player names and team name
|
||||
x = 1
|
||||
print; print; print
|
||||
if getYesNo("Would you like the instructions") == "yes" then
|
||||
print
|
||||
print "This is a simulated hockey game."
|
||||
print "Question Response"
|
||||
print "pass Type in the number of passes you would"
|
||||
print " like to make, from 0 to 3."
|
||||
print "shot Type the number corresponding to the shot"
|
||||
print " you want to make. Enter:"
|
||||
print " 1 for a slapshot"
|
||||
print " 2 for a wristshot"
|
||||
print " 3 for a backhand"
|
||||
print " 4 for a snap shot"
|
||||
print "area Type in the number corresponding to"
|
||||
print " the area you are aiming at. Enter:"
|
||||
print " 1 for upper left hand corner"
|
||||
print " 2 for upper right hand corner"
|
||||
print " 3 for lower left hand corner"
|
||||
print " 4 for lower right hand corner"
|
||||
print
|
||||
print "At the start of the game, you will be asked for the names"
|
||||
print "of your players. They are entered in the order: "
|
||||
print "left wing, center, right wing, left defense,"
|
||||
print "right defense, goalkeeper. Any other input required will"
|
||||
print "have explanatory instructions."
|
||||
end if
|
||||
|
||||
setup = function
|
||||
teamNames = getTwoStrings("Enter the two teams")
|
||||
aNames[7] = teamNames[0]
|
||||
bNames[7] = teamNames[1]
|
||||
print
|
||||
globals.roundsInGame = getNumber("Enter the number of minutes in a game")
|
||||
print
|
||||
print "Would the " + aNames[7] + " coach enter his team"
|
||||
print
|
||||
for i in range(1, 6)
|
||||
aNames[i] = input("Player " + i + "? ")
|
||||
end for
|
||||
print
|
||||
print "Would the " + bNames[7] + " coach do the same"
|
||||
print
|
||||
for t in range(1, 6)
|
||||
bNames[t] = input("Player " + t + "? ")
|
||||
end for
|
||||
print
|
||||
rs = input("Input the referee for this game? ")
|
||||
print
|
||||
print " "*10 + aNames[7] + " starting lineup"
|
||||
for t in range(1, 6)
|
||||
print aNames[t]
|
||||
end for
|
||||
print
|
||||
print " "*10 + bNames[7] + " starting lineup"
|
||||
for t in range(1, 6)
|
||||
print bNames[t]
|
||||
end for
|
||||
print
|
||||
print "We're ready for tonights opening face-off."
|
||||
print rs + " will drop the puck between " + aNames[2] + " and " + bNames[2]
|
||||
end function
|
||||
|
||||
shootAndScore = function(shootingTeam, shooter, asst1, asst2, z)
|
||||
while true
|
||||
ha[20] = floor(100 * rnd) + 1
|
||||
if ha[20] % z != 0 then break
|
||||
a2 = floor(100 * rnd) + 1
|
||||
if a2 % 4 == 0 then
|
||||
if shootingTeam == 1 then
|
||||
print "Save " + bNames[6] + " -= 1 rebound"
|
||||
else
|
||||
print "Save " + aNames[6] + " -= 1 follow up"
|
||||
end if
|
||||
continue
|
||||
end if
|
||||
end while
|
||||
|
||||
if shootingTeam == 1 then
|
||||
print "Goal " + aNames[7]
|
||||
ha[9] += 1
|
||||
else
|
||||
print "Score " + bNames[7]
|
||||
ha[8] += 1
|
||||
end if
|
||||
print char(7) * 25
|
||||
print "Score: "
|
||||
if ha[8] <= ha[9] then
|
||||
printWithTab aNames[7] + ": " + ha[9] + "\t" + bNames[7] + ": " + ha[8]
|
||||
else
|
||||
printWithTab bNames[7] + ": " + ha[8] + "\t" + aNames[7] + ": " + ha[9]
|
||||
end if
|
||||
if shootingTeam == 1 then
|
||||
print "Goal scored by: " + aNames[shooter]
|
||||
if asst1 then
|
||||
if asst2 then
|
||||
print " assisted by: " + aNames[asst1] + " and " + aNames[asst2]
|
||||
else
|
||||
print " assisted by: " + aNames[asst1]
|
||||
end if
|
||||
else
|
||||
print " unassisted."
|
||||
end if
|
||||
ta[shooter] += 1
|
||||
t1[asst1] += 1
|
||||
t1[asst2] += 1
|
||||
else
|
||||
print "Goal scored by: " + bNames[shooter]
|
||||
if asst1 then
|
||||
if asst2 then
|
||||
print " assisted by: " + bNames[asst1] + " and " + bNames[asst2]
|
||||
else
|
||||
print " assisted by: " + bNames[asst1]
|
||||
end if
|
||||
else
|
||||
print " unassisted."
|
||||
end if
|
||||
t2[shooter] += 1
|
||||
t3[asst1] += 1
|
||||
t3[asst2] += 1
|
||||
end if
|
||||
end function
|
||||
|
||||
shootBlocked = function(shootingTeam, shooter)
|
||||
s1 = floor(6 * rnd) + 1
|
||||
if shootingTeam == 1 then
|
||||
if s1 == 1 then
|
||||
print "Kick save and a beauty by " + bNames[6]
|
||||
print "cleared out by " + bNames[3]
|
||||
return false
|
||||
else if s1 == 2 then
|
||||
print "what a spectacular glove save by " + bNames[6]
|
||||
print "and " + bNames[6] + " golfs it into the crowd"
|
||||
else if s1 == 3 then
|
||||
print "skate save on a low steamer by " + bNames[6]
|
||||
return false
|
||||
else if s1 == 4 then
|
||||
print "pad save by " + bNames[6] + " off the stick"
|
||||
print "of " + aNames[shooter] + " and " + bNames[6] + " covers up"
|
||||
else if s1 == 5 then
|
||||
print "whistles one over the head of " + bNames[6]
|
||||
return false
|
||||
else if s1 == 6 then
|
||||
print bNames[6] + " makes a face save!! and he is hurt"
|
||||
print "the defenseman " + bNames[5] + " covers up for him"
|
||||
end if
|
||||
else
|
||||
if s1 == 1 then
|
||||
print "stick save by " + aNames[6] +""
|
||||
print "and cleared out by " + aNames[4]
|
||||
return false
|
||||
else if s1 == 2 then
|
||||
print "Oh my god!! " + bNames[shooter] + " rattles one off the post"
|
||||
print "to the right of " + aNames[6] + " and " + aNames[6] + " covers "
|
||||
print "on the loose puck!"
|
||||
else if s1 == 3 then
|
||||
print "Skate save by " + aNames[6]
|
||||
print aNames[6] + " whacks the loose puck into the stands"
|
||||
else if s1 == 4 then
|
||||
print "Stick save by " + aNames[6] + " and he clears it out himself"
|
||||
return false
|
||||
else if s1 == 5 then
|
||||
print "Kicked out by " + aNames[6]
|
||||
print "and it rebounds all the way to center ice"
|
||||
return false
|
||||
else if s1 == 6 then
|
||||
print "Glove save " + aNames[6] + " and he hangs on"
|
||||
end if
|
||||
end if
|
||||
end function
|
||||
|
||||
doOneRound = function
|
||||
control = floor(2 * rnd) + 1
|
||||
if control == 1 then
|
||||
print aNames[7] + " has control of the puck"
|
||||
else
|
||||
print bNames[7] + " has control."
|
||||
end if
|
||||
p = getNumber("Pass", 0, 3)
|
||||
for n in range(1, 3)
|
||||
ha[n] = 0
|
||||
end for
|
||||
while true
|
||||
for j in range(1, p + 2)
|
||||
ha[j] = floor(5 * rnd) + 1
|
||||
end for
|
||||
if not (ha[j - 1] == ha[j - 2] or (p + 2 >= 3 and (ha[j - 1] == ha[j - 3] or ha[j - 2] == ha[j - 3]))) then break
|
||||
end while
|
||||
|
||||
if p == 0 then
|
||||
s = getNumber("Shot", 1, 4)
|
||||
if control == 1 then
|
||||
print aNames[ha[j - 1]], ""
|
||||
g = ha[j - 1]
|
||||
g1 = 0
|
||||
g2 = 0
|
||||
else
|
||||
print bNames[ha[j - 1]], ""
|
||||
g2 = 0
|
||||
g2 = 0
|
||||
g = ha[j - 1]
|
||||
end if
|
||||
if s == 1 then
|
||||
print " lets a boomer go from the red line!!"
|
||||
z = 10
|
||||
else if s == 2 then
|
||||
print " flips a wristshot down the ice"
|
||||
// BUG: missing line 430 in the original caused it to fall through
|
||||
// to the s == 3 case. We'll instead just do:
|
||||
z = 2
|
||||
else if s == 3 then
|
||||
print " backhands one in on the goaltender"
|
||||
z = 25
|
||||
else
|
||||
print " snaps a long flip shot"
|
||||
z = 17
|
||||
end if
|
||||
else
|
||||
if control == 1 then
|
||||
if p == 1 then
|
||||
print aNames[ha[j - 2]] + " leads " + aNames[ha[j - 1]] + " with a perfect pass."
|
||||
print aNames[ha[j - 1]] + " cutting in!!!"
|
||||
g = ha[j - 1]
|
||||
g1 = ha[j - 2]
|
||||
g2 = 0
|
||||
z1 = 3
|
||||
else if p == 2 then
|
||||
print aNames[ha[j - 2]] + " gives to a streaking " + aNames[ha[j - 1]]
|
||||
print aNames[ha[j - 3]] + " comes down on " + bNames[5] + " and " + bNames[4]
|
||||
g = ha[j - 3]
|
||||
g1 = ha[j - 1]
|
||||
g2 = ha[j - 2]
|
||||
z1 = 2
|
||||
else if p == 3 then
|
||||
print "oh my god!! a ' 4 on 2 ' situation"
|
||||
print aNames[ha[j - 3]] + " leads " + aNames[ha[j - 2]]
|
||||
print aNames[ha[j - 2]] + " is wheeling through center."
|
||||
print aNames[ha[j - 2]] + " gives and goest with " + aNames[ha[j - 1]]
|
||||
print "pretty passing!"
|
||||
print aNames[ha[j - 1]] + " drops it to " + aNames[ha[j - 4]]
|
||||
g = ha[j - 4]
|
||||
g1 = ha[j - 1]
|
||||
g2 = ha[j - 2]
|
||||
z1 = 1
|
||||
end if
|
||||
else
|
||||
if p == 1 then
|
||||
print bNames[ha[j - 1]] + " hits " + bNames[ha[j - 2]] + " flying down the left side"
|
||||
g = ha[j - 2]
|
||||
g1 = ha[j - 1]
|
||||
g2 = 0
|
||||
z1 = 3
|
||||
else if p == 2 then
|
||||
print "it's a ' 3 on 2 '!"
|
||||
print "only " + aNames[4] + " and " + aNames[5] + " are back."
|
||||
print bNames[ha[j - 2]] + " gives off to " + bNames[ha[j - 1]]
|
||||
print bNames[ha[j - 1]] + " drops to " + bNames[ha[j - 3]]
|
||||
g = ha[j - 3]
|
||||
g1 = ha[j - 1]
|
||||
g2 = ha[j - 2]
|
||||
z1 = 2
|
||||
else if p == 3 then
|
||||
print " a '3 on 2 ' with a ' trailer '!"
|
||||
print bNames[ha[j - 4]] + " gives to " + bNames[ha[j - 2]] + " who shuffles it off to"
|
||||
print bNames[ha[j - 1]] + " who fires a wing to wing pass to "
|
||||
print bNames[ha[j - 3]] + " aNames he cuts in alone!!"
|
||||
g = ha[j - 3]
|
||||
g1 = ha[j - 1]
|
||||
g2 = ha[j - 2]
|
||||
z1 = 1
|
||||
end if
|
||||
end if
|
||||
s = getNumber("Shot", 1, 4)
|
||||
if control == 1 then
|
||||
print aNames[g], ""
|
||||
else
|
||||
print bNames[g], ""
|
||||
end if
|
||||
if s == 1 then
|
||||
print " lets a big slap shot go!!"
|
||||
z = 4
|
||||
z += z1
|
||||
else if s == 2 then
|
||||
print " rips a wrist shot off"
|
||||
z = 2
|
||||
z += z1
|
||||
else if s == 3 then
|
||||
print " gets a backhand off"
|
||||
z = 3
|
||||
z += z1
|
||||
else
|
||||
print " snaps off a snap shot"
|
||||
z = 2
|
||||
z += z1
|
||||
end if
|
||||
end if
|
||||
|
||||
a = getNumber("Area", 1, 4) // area shot in
|
||||
a1 = floor(4 * rnd) + 1 // area vulnerable
|
||||
|
||||
if control == 1 then
|
||||
globals.teamAShotsOnNet += 1
|
||||
else
|
||||
globals.teamBShotsOnNet += 1
|
||||
end if
|
||||
if a == a1 then
|
||||
shootAndScore control, g, g1, g2
|
||||
else
|
||||
shootBlocked control, g
|
||||
end if
|
||||
return true
|
||||
end function
|
||||
|
||||
// Main program
|
||||
setup
|
||||
teamAShotsOnNet = 0
|
||||
teamBShotsOnNet = 0
|
||||
for l in range(1, roundsInGame)
|
||||
while not doOneRound; end while // (repeat until it returns true)
|
||||
if l < roundsInGame then print "And we're ready for the face-off"
|
||||
end for
|
||||
|
||||
|
||||
|
||||
print char(7)*30
|
||||
print "That's the Siren"
|
||||
print
|
||||
print " "*15 + "Final Score:"
|
||||
if ha[8] <= ha[9] then
|
||||
printWithTab aNames[7] + ": " + ha[9] + "\t" + bNames[7] + ": " + ha[8]
|
||||
else
|
||||
printWithTab bNames[7] + ": " + ha[8] + "\t" + aNames[7] + ": " + ha[9]
|
||||
end if
|
||||
print
|
||||
print " "*10 + "Scoring Summary"
|
||||
print
|
||||
print " "*25 + aNames[7]
|
||||
printWithTab "\tName\tGoals\tAssists"
|
||||
printWithTab "\t -= 1 -= 1\t -= 1 -= 1-\t -= 1 -= 1 -= 1-"
|
||||
for i in range(1, 5)
|
||||
printWithTab "\t" + aNames[i] + "\t" + ta[i] + "\t" + t1[i]
|
||||
end for
|
||||
print
|
||||
print " "*25 + bNames[7]
|
||||
printWithTab "\tName\tGoals\tAssists"
|
||||
printWithTab "\t -= 1 -= 1\t -= 1 -= 1-\t -= 1 -= 1 -= 1-"
|
||||
for t in range(1, 5)
|
||||
printWithTab "\t" + bNames[t] + "\t" + t2[t] + "\t" + t3[t]
|
||||
end for
|
||||
print
|
||||
print "Shots on net"
|
||||
print aNames[7] + ": " + teamAShotsOnNet
|
||||
print bNames[7] + ": " + teamBShotsOnNet
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript kinema.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "kinema"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript letter.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "letter"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript nicomachus.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "nicomachus"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript number.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "number"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript sinewave.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "sinewave"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript number.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "number"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript train.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "train"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript trap.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "trap"
|
||||
run
|
||||
|
||||
@@ -10,7 +10,7 @@ Download for your system from https://miniscript.org/cmdline/, install, and then
|
||||
miniscript war.ms
|
||||
|
||||
2. Mini Micro:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the BASIC program. Then, at the Mini Micro command prompt, enter:
|
||||
Download Mini Micro from https://miniscript.org/MiniMicro/, launch, and then click the top disk slot and chose "Mount Folder..." Select the folder containing the MiniScript program and this README file. Then, at the Mini Micro command prompt, enter:
|
||||
|
||||
load "war"
|
||||
run
|
||||
|
||||
@@ -15,6 +15,10 @@ As published in Basic Computer Games (1978):
|
||||
Downloaded from Vintage Basic at
|
||||
http://www.vintage-basic.net/games.html
|
||||
|
||||
#### Known Bugs
|
||||
|
||||
- The value of some furs are not changed from the previous fort when you select fort 2 or 3. As a result, you will get a different value for your firs depending on whether you have previously visited a different fort. (All fur values are set when you visit Fort 1.)
|
||||
|
||||
#### Porting Notes
|
||||
|
||||
(please note any difficulties or challenges in porting here)
|
||||
|
||||
@@ -14,6 +14,10 @@ As published in Basic Computer Games (1978):
|
||||
Downloaded from Vintage Basic at
|
||||
http://www.vintage-basic.net/games.html
|
||||
|
||||
#### Known Bugs
|
||||
|
||||
- The weakness numbers printed in the original BASIC program are wrong. It says 4=TRAP SHOTS, 5=PUTTING, but in the code, trap shots and putting are 3 and 4, respectively.
|
||||
|
||||
#### Porting Notes
|
||||
|
||||
(please note any difficulties or challenges in porting here)
|
||||
|
||||
@@ -23,8 +23,7 @@ http://www.vintage-basic.net/games.html
|
||||
|
||||
#### Porting Notes
|
||||
|
||||
(please note any difficulties or challenges in porting here)
|
||||
|
||||
- Though the file name and README both spell "Hammurabi" with two M's, the program itself consistently uses only one M.
|
||||
|
||||
#### External Links
|
||||
- C: https://github.com/beyonddream/hamurabi
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
This is a sample of one of the great number of conversational programs. In a sense, it is like a CAI program except that its responses are just good fun. Whenever a computer is exhibited at a convention or conference with people that have not used a computer before, the conversational programs seem to get the first activity.
|
||||
|
||||
In this particular program, the computer dispenses advice on various problems such as sex. health, money, or job.
|
||||
In this particular program, the computer dispenses advice on various problems such as sex, health, money, or job.
|
||||
|
||||
David Ahl is the author of HELLO.
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@ As published in Basic Computer Games (1978):
|
||||
Downloaded from Vintage Basic at
|
||||
http://www.vintage-basic.net/games.html
|
||||
|
||||
#### Known Bugs
|
||||
|
||||
- There are valid board positions that will cause the program to print "ILLEGAL BOARD PATTERN" and break. For example: human 8,5; computer 1,5; human 9,5; computer 3,5; human 7,5. This is a valid game-over pattern, but it is not detected as such because of incorrect logic in lines 240-320 (intended to detect whether the computer has any legal moves).
|
||||
|
||||
#### Porting Notes
|
||||
|
||||
(please note any difficulties or challenges in porting here)
|
||||
|
||||
@@ -15,6 +15,11 @@ As published in Basic Computer Games (1978):
|
||||
Downloaded from Vintage Basic at
|
||||
http://www.vintage-basic.net/games.html
|
||||
|
||||
#### Known Bugs
|
||||
|
||||
- An apparent missing line 430 causes the code to fall through from the "FLIPS A WRISTSHOT" case directly to the "BACKHANDS ONE" case.
|
||||
- The author consistently misspells the verb "lets" (writing it like the contraction "let's"), while having no trouble with "leads", "gets", "hits", etc.
|
||||
|
||||
#### Porting Notes
|
||||
|
||||
(please note any difficulties or challenges in porting here)
|
||||
|
||||
Reference in New Issue
Block a user