mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-21 06:43:06 -08:00
Added MiniScript version of 76_Russian_Roulette.
This commit is contained in:
@@ -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
|
||||
```
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user