From: Ilan Berci Date: 2009-01-22T06:26:06+09:00 Subject: Re: Class design question Jes炭s Gabriel y Gal叩n wrote: > > Then, only thing is that subclasses should not override initizalize > without calling super, which I'm not sure how good/bad it is as a well > designed framework. > > Well, that's the issue, any ideas are very welcome. > > Regards, > > Jesus. Jes炭s First, it's great to meet another EuroGamer.. (and just so you know, Alhambra has already been done :) Anyways, none of your 3 decks differ in ANY way.. the only way they differ is in their operation, not their structure which means it's not a good candidate for sub classing. i.e... the contents of the deck can be pulled out into a deck builder (check out GOF builder/GOF factory) (probably some type of game class) that would construct the deck for a particular game but the deck for each game would have the same operations such as shuffle(), sort(), draw(), etc.. hth ilan -- Posted via http://www.ruby-forum.com/.