From: Jeremy Woertink Date: 2006-10-13T05:57:06+09:00 Subject: Re: New to ruby questions Jeff Cohen wrote: >> I have all my classes and all my methods defined, now I just want to >> make the actual game. I am not doing any sort of GUI. Here is my code. >> > > Welcome to Ruby, Jeremy! > > First, Ruby interprets code as it goes, so you need to put your class > definitions higher than the code that tries to reference them. So move > all your class definitions to the top. > > Secondly, just use 'exit' if you need to stop the script prematurely. A > better way is for your big while loop to use a variable to tell it when > to stop looping, and set this variable to true after you call game_over. > > Does this help? Feel free to ask more questions if something's unclear. > > Jeff > softiesonrails.com Thanks man. It does help. I will be asking plenty of other questions, but for now, back to my code. -- Posted via http://www.ruby-forum.com/.