[Seaside] Design Question of a very small game

Avi Bryant avi at beta4.com
Thu Oct 21 12:40:36 CEST 2004


On Oct 21, 2004, at 12:22 PM, Yar Hwee Boon wrote:

> On Wed, 20 Oct 2004 22:05:52 +0200, Alexandre Bergel 
> <bergel at iam.unibe.ch> wrote:
>
>> Hi!
>>
>> I would like to know a bit your opinion about the code I just wrote.
>> It consist in a very small game: the computer choose randomly a 
>> number between 0 and 100, and the user has to guess it. For each 
>> answer, the computer says: 'too litle' or 'too big'.
>>
>> It is composed of 5 classes with a couple of method for each of them.
>> Do you have a better design for this simple game ?
>
> Try the attached. Note that you are not supposed to send #call: in 
> #renderContentOn:

But note that your attached version does this too, just hidden behind a 
send to #inform:.

Avi



More information about the Seaside mailing list