mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-12 07:40:50 -08:00
Added MiniScript version of 63_Name.
This commit is contained in:
21
00_Alternate_Languages/63_Name/MiniScript/README.md
Normal file
21
00_Alternate_Languages/63_Name/MiniScript/README.md
Normal 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 name.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 name.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 "name"
|
||||
run
|
||||
```
|
||||
25
00_Alternate_Languages/63_Name/MiniScript/name.ms
Normal file
25
00_Alternate_Languages/63_Name/MiniScript/name.ms
Normal file
@@ -0,0 +1,25 @@
|
||||
print " "*34 + "Name"
|
||||
print " "*15 + "Creative Computing Morristown, New Jersey"
|
||||
print; print; print
|
||||
print "Hello."; print "My name is Creative Computer."
|
||||
name = input("What's your name (first and last)? ")
|
||||
|
||||
s = ""
|
||||
for i in range(name.len - 1)
|
||||
s += name[i]
|
||||
end for
|
||||
print; print "Thank you, " + s + "."
|
||||
print "Oops! I guess I got it backwards. A smart"
|
||||
print "computer like me shouldn't make a mistake like that!"; print
|
||||
print "But i just noticed your letters are out of order."
|
||||
s = name.split("").sort.join("")
|
||||
print "Let's put them in order like this: " + s
|
||||
yn = input("Don't you like that better? ").lower
|
||||
print
|
||||
if yn and yn[0] == "y" then
|
||||
print "I knew you'd agree!!"
|
||||
else
|
||||
print "I'm sorry you don't like it that way."
|
||||
end if
|
||||
print; print "I really enjoyed meeting you " + name + "."
|
||||
print "Have a nice day!"
|
||||
Reference in New Issue
Block a user