From: "J. Merrill" Date: 2005-11-17T03:38:14+09:00 Subject: Re: Equvialent of RoboCode and/or Terrarium for Ruby? SimonKroeger wrote (in part): > module Robot > #the height of the battlefield > attr_reader :battlefield_height > > #the width of the battlefield > attr_reader :battlefield_width Are you defining the "base" Robot that should be the minimal, standard, parent of most "battle-ready" Robots? Shouldn't the Robot hold a reference to a battlefield object, not battlefield_blah arbitrary individual bits of info about the battlefield? For example, if a battlefield were to have obstacles, that info belongs in the battlefield and not in each robot. [snip] > class MyRobot > include Robot What keeps MyRobot < Robot from being more appropriate? (I'm rather new to Ruby, and love the mixin capability, but why not inheritance when there's no multiple-inheritance issue?) -- Posted via http://www.ruby-forum.com/.