From: "Sebastjan H." Date: 2012-09-30T03:49:00+09:00 Subject: Re: still learning by doing - connecting rooms in a game Sebastjan H. wrote in post #1077994: > I've try to follow the above guidelines. I've read about the inheritance > and the templates as well. I'm going to use the templates and the > controlling object would be my runner. > > So far I made the super class Room and modified the subclass > ChildBedroom. > It plays out ok and the room returns the value of the next room to be > explored. I still haven't figured out how exactly I am going to do that > in the runner, but I haven't played with that much yet. > > I haven't learned about the testing yet, so for now to test it, I am > just running the ChildBedroom.rb where I've put the childreen_room > instantiation at the end. > > Can anyone have a look if I am on the right track with the relationships > between the two classes? > > http://bazaar.launchpad.net/~sebastjan-hribar/zombies/trunk/revision/8?start_revid=8 > I've also just added the amended runner.rb. I used the same logic as in another learning game from the book learn the hard way. Now I get the conversion error, because what is returned by the room.state can't be passed into the loop again dut to type error. -- Posted via http://www.ruby-forum.com/.