[CS] TicTacToe

Ingo Hohmann ingo at 2b1.de
Mon Apr 28 14:34:30 UTC 2003


Thanks Sean Charles and all others,

I am answering especially to this one, because ...

Bibbers wrote:
>> "Change Set:        TicTacToe
>> Date:            27 April 2003
>> Author:            Ingo Hohmann
<..>
> DRAWING A CROSS: I've modified your drawing code to draw the red mark as 
> a cross instead of a circle...
<..>
 >                     canvas
>                         line: markBounds topLeft
>                         to: markBounds bottomRight
>                         width: 5
>                         color: Color red.
>                     canvas
>                         line: markBounds topRight
>                         to: markBounds bottomLeft
>                         width: 5
>                         color: Color red]

... now you can kick me ... I was so engulfed in Rectangles and Ovals, I 
didn't even think about using a Line!

About the winning checks, I first tried to use solely and: and or:, but 
then decided to write equalTo:and: at least it looked a little less 
messy (and worked ;-). Given the data structures I used, would there 
have been a better way?


Kind regards,

Ingo


PS: Do you think a version with all those changes from the list would be 
worth publishing as a newbie project for others to learn?



More information about the Squeak-dev mailing list