- 521
- Posts
- 16
- Years
- Seen Sep 11, 2013
update!
First of all, I am learning ruby from https://pine.fm/LearnToProgram/.
Second, ruby and rgss have a few major differences but, are mostly similar.
Third, here is the updated ruby code. (I am just trying to see if Wichu's advice works.)
class Orangetree
def plant
puts "You got an orange tree seed!"
puts "would you like to plant the seed?"
puts "Type in Yes or No."
plantb = gets.chomp.downcase
if plantb == "yes"
tree
if plantb == "no"
exit
end
else
puts "Please answer with yes or no."
end
end
def tree
puts "It worked!"
end
end
plant
It still does not work!
forth, again that program was just testing to see if the advice worked.
First of all, I am learning ruby from https://pine.fm/LearnToProgram/.
Second, ruby and rgss have a few major differences but, are mostly similar.
Third, here is the updated ruby code. (I am just trying to see if Wichu's advice works.)
class Orangetree
def plant
puts "You got an orange tree seed!"
puts "would you like to plant the seed?"
puts "Type in Yes or No."
plantb = gets.chomp.downcase
if plantb == "yes"
tree
if plantb == "no"
exit
end
else
puts "Please answer with yes or no."
end
end
def tree
puts "It worked!"
end
end
plant
It still does not work!
forth, again that program was just testing to see if the advice worked.