Last active
December 30, 2015 02:59
-
-
Save jsrn/7766690 to your computer and use it in GitHub Desktop.
Flowers in Ruby
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
class Flowers | |
require "core/player.rb" | |
def initialize | |
print_banner | |
set_up_game | |
enter_game_loop | |
end | |
def print_banner | |
puts ".----------------------------- FLOWERS -----------------------------." | |
puts "| A(n) ORG_NAME_HERE Adventure |" | |
puts "| dot|not ToxicVenom jsrn |" | |
puts "`-------------------------------------------------------------------'" | |
end | |
def handle_input(input) | |
puts input | |
end | |
def enter_game_loop | |
while 1 do | |
print "> " | |
input = gets.chomp | |
handle_input(input) | |
end | |
end | |
def set_up_game | |
@player = Player.new | |
@player.pick_name | |
end | |
# Create a new object from the class "Flowers" and store it in the variable | |
# "game" | |
game = Flowers.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment