Added MiniScript version of 24_Chemist.

This commit is contained in:
JoeStrout
2023-07-26 15:20:25 -07:00
parent 01e1cc964a
commit 98b62bd114
3 changed files with 53 additions and 2 deletions

View 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 chemist.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 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:
load "chemist"
run

View File

@@ -0,0 +1,30 @@
print " "*33 + "Chemist"
print " "*15 + "Creative Computing Morristown, New Jersey"
print; print; print
print "The fictitious chemical kryptocyanic acid can only be"
print "diluted by the ratio of 7 parts water to 3 parts acid."
print "If any other ratio is attempted, the acid becomes unstable"
print "and soon explodes. Given the amount of acid, you must"
print "decide how much water to add for dilution. If you miss"
print "you face the consequences."
deaths = 0
while deaths < 9
acid = floor(rnd * 50)
water = 7 * acid/3
response = input(acid +" liters of kryptocyanic acid. How much water? ").val
diff = abs(water - response)
if diff > water/20 then
print " SIZZLE! You have just been desalinated into a blob"
print " of quivering protoplasm!"
deaths += 1
if deaths < 9 then
print " However, you may try again with another life."
end if
else
print " Good job! You may breathe now, but don't inhale the fumes!"
print
end if
end while
print " Your 9 lives are used, but you will be long remembered for"
print " your contributions to the field of comic book chemistry."

View File

@@ -13,11 +13,13 @@ As published in Basic Computer Games (1978):
Downloaded from Vintage Basic at
http://www.vintage-basic.net/games.html
#### Known Bugs
- There is a typo in the original Basic, "...DECIDE **WHO** MUCH WATER..." should be "DECIDE **HOW** MUCH WATER"
#### Porting Notes
(please note any difficulties or challenges in porting here)
There is a type in the original Basic, "...DECIDE **WHO** MUCH WATER..." should be "DECIDE **HOW** MUCH WATER"
#### External Links
- C: https://github.com/ericfischer/basic-computer-games/blob/main/24%20Chemist/c/chemist.c