Hi,

Michael Sung wrote in post #1064257:
> QUESTION: In the below code snippet, why does he use "if @asleep"
> instead of just writing "passageOfTime", "puts", and then, "if @asleep =
> false"?

I'm not quite sure what you mean by "if @asleep = false". Anyway, you 
cannot leave out the if statement. You cannot even put the 
"passageOfTime" and the "puts" into a single if statement, because the 
"passageOfTime" may change the value of @asleep.

The dragon may wake up during passageOfTime (when he's hungry or poopy). 
So after passageOfTime you have to check again if he's still asleep.

-- 
Posted via http://www.ruby-forum.com/.