As a demo of how agile Ruby is when dealing with objects, I've knocked up a quick text adventure. The source code is here. Every location is an object, and it's easy to extend.
And then I've followed up with a slightly more complex version which implements items and lets you pick them up and drop them in different locations. Some of the Ruby isn't as compact as it could be, but it's designed for Ruby newcomers to get a feel for how objects and the basic control structures work.
excellent stuff. thats exactly what i was looking for (i'm playing around with writing a menu driven Ruby app).
what would be even nicer would be an ncurses version - theres an ncurses ruby extension available here:
http://ncurses-ruby.berlios.de/
Posted by: justin at April 12, 2006 12:33 PMReturn to the homepage.
Privacy Policy