[Newbies] The Bridge Playing example

Andy Burnett andy.burnett at knowinnovation.com
Sun Aug 24 23:58:48 UTC 2008


<< Todd said:
A deck, hand, pile, all can be implemented as just an
OrderedCollection.  You might start with a Deal or BridgeRound or
something.  It might have some methods like:

initialize
       | hands deck |
       deck := Card bridgeDeck shuffled asOrderedCollection. "just like
english"
       north := OrderedCollection new.
       south := OrderedCollection new.
       east := OrderedCollection new.
       west := OrderedCollection new.
       trick := OrderedCollection new.


-- snip -- >>


Todd, thanks for writing that up. I found it really interesting to see how
you tackled the problem.  I think it would be great if - as time permits -
the experts of the list could take a problem - nice simple ones would be
good, and show how you might solve it.  It is also very interesting to see
how you refine/modify each others' solutions.

cheers
AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20080824/6f37a2db/attachment.htm


More information about the Beginners mailing list