This file contains hidden or 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 is a very simple textual adventure taking place in gloomville UNFINISHED -- feel free to finish it and send me a copy :) | |
def room1 | |
puts "You are walking down a pale grey road with rather boring shrubs and trees besides you to the east and west. A sign to the west catches your attentions. A gate blocks the path to your south as the road continues on to the north" | |
puts "Exits : north" | |
puts ' ' | |
action = gets.chomp | |
if action == 'read sign' | |
puts ' ' | |
puts ' The sign reads..' |
This file contains hidden or 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
# METHOD 1 ADDITION (add) | |
def add | |
puts ' ' | |
puts ' ' | |
puts "Please enter your first number" | |
num1 = gets.strip.to_i | |
puts ' ' | |
puts "Please enter your secound number" | |
num2 = gets.strip.to_i |
This file contains hidden or 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
jackal@ruby:~/Desktop/ruby-gnome2-all-2.0.2/gtk3/sample/gtk-demo$ ruby rotated_text.rb | |
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- common (LoadError) | |
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
from rotated_text.rb:14:in `<main>' |
This file contains hidden or 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
def space | |
puts " " | |
puts " " | |
end | |
# MAIN MENU | |
def main_menu | |
space |