From 91a494df5b3ec3fc16c3b8e9a0f59202d621938d Mon Sep 17 00:00:00 2001 From: JoeStrout Date: Mon, 2 Oct 2023 15:30:55 -0700 Subject: [PATCH] Added MiniScript version of 76_Russian_Roulette. --- .../76_Russian_Roulette/MiniScript/README.md | 21 +++++++++++ .../MiniScript/russianroulette.ms | 37 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 00_Alternate_Languages/76_Russian_Roulette/MiniScript/README.md create mode 100644 00_Alternate_Languages/76_Russian_Roulette/MiniScript/russianroulette.ms diff --git a/00_Alternate_Languages/76_Russian_Roulette/MiniScript/README.md b/00_Alternate_Languages/76_Russian_Roulette/MiniScript/README.md new file mode 100644 index 00000000..79d028a9 --- /dev/null +++ b/00_Alternate_Languages/76_Russian_Roulette/MiniScript/README.md @@ -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 +``` \ No newline at end of file diff --git a/00_Alternate_Languages/76_Russian_Roulette/MiniScript/russianroulette.ms b/00_Alternate_Languages/76_Russian_Roulette/MiniScript/russianroulette.ms new file mode 100644 index 00000000..3eb896f9 --- /dev/null +++ b/00_Alternate_Languages/76_Russian_Roulette/MiniScript/russianroulette.ms @@ -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