-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ca9712
commit af01094
Showing
2 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
def death() | ||
quips = ["You died. You suck at this.", | ||
"Nice job, you died... jackass.", | ||
"You're such a looooser.", | ||
"I have a small puppy who's better at this."] | ||
puts quips[rand(quips.length())] | ||
Process.exit(1) | ||
# Process.exit is really cool | ||
# Without arguments it returns 0, success | ||
# With the argument above it returns 1 | ||
# This allows you to write a script which can exit with the error code you specify | ||
# If this Process.exit(1) executes in this script, then this script will exit with error code 1 | ||
# Then in bash if you echo $? you'll see this script did exit with error code 1 | ||
end | ||
|
||
ROOMS = { | ||
:death => method(:death), | ||
} |