Added MiniScript version of 76_Russian_Roulette.

This commit is contained in:
JoeStrout
2023-10-02 15:30:55 -07:00
parent bd23c4778b
commit 91a494df5b
2 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
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 russianroulette.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 russianroulette.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 "russianroulette"
run
```

View File

@@ -0,0 +1,37 @@
print " "*28 + "Russian Roulette"
print " "*15 + "Creative Computing Morristown New Jersey"
print; print; print
print "This is a game of >>>>>>>>>>Russian Roulette."
while true
print; print "Here is a revolver."
print "Type '1' to spin chamber and pull trigger."
print "Type '2' to give up."
print "GO"
n = 0
while n < 10
inp = input("? ").val
if inp == 2 then
print " CHICKEN!!!!!"
break
else if rnd > 0.833333 then
print " BANG!!!!! You're dead!"
print "Condolences will be sent to your relatives."
break
else
n += 1
print "- CLICK -"
print
end if
end while
if n >= 10 then
print "You win!!!!!"
print "Let someone else blow his brains out."
else
print; print; print
print "...Next victim..."
end if
end while