mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-12 07:40:50 -08:00
Added MiniScript version of 24_Chemist.
This commit is contained in:
19
00_Alternate_Languages/24_Chemist/MiniScript/README.md
Normal file
19
00_Alternate_Languages/24_Chemist/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 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
|
||||
30
00_Alternate_Languages/24_Chemist/MiniScript/chemist.ms
Normal file
30
00_Alternate_Languages/24_Chemist/MiniScript/chemist.ms
Normal 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."
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user