#lang racket ;; This is the message passing approach to the patience solitaire game ;; Flower Garden. ;; ;; This is the variant Flower Moon Garden with a relaxed ruleset. You ;; can move only one card at time but from anywhere to anywhere. ;; Sequences in the flower beds have to be build by color, i.e. red or ;; black. The foundations are built from ace to king but cards can be ;; moved back into the game. You can double click a card and if ;; possible it will find its place in the foundations. You can place ;; up to sixteen cards in the bouquet. Most games can be won. ;; ;; (The layout of the bouquet, i.e. the reserve of cards at the bottom ;; of the table is done automatically but only after a card has been ;; moved successfully. Rethinking and correcting this is left as ;; exercise for the interested player.) ;; ;; Description & Rules ;; ;; One deck of 52 cards. ;; ;; < from wikipedia ;; Thirty-six cards are dealt in to six columns, each containing six ;; cards. The columns are called the "flower beds" and the entire ;; tableau is sometimes called "the garden." The sixteen leftover ;; cards become the reserve, or "the bouquet." ;; ;; The top cards of each flower-bed and all of the cards in the ;; bouquet are available for play. Cards can only be moved one at a ;; time and can be built either on the foundations or on the other ;; flower beds. The foundations are built up by suit, from Ace to King ;; (a general idea of the game is to release the aces first). The ;; cards in the garden, on the other hand, can be built down ;; regardless of suit and any empty flower bed can be filled with any ;; card. The cards in the bouquet can be used to aid in building, be ;; put into the foundations, or fill an empty flower bed. ;; ;; The game is won when all cards end up in the foundations. ;; > end from wikipedia ;;
;; ;; Technical Note: While it is written in a rather traditional way ;; without mixins, traits or an emphasis on surrogates it might ;; contain ideas, concepts and terms that go beyond today's message ;; passing "customs". A new message passing primitive "broadcast" and ;; the term hub for certain classes are consequences of thinking about ;; the future of message passing, parallel objects and one new program ;; code abstraction system "to rule them all" especially when it comes ;; to open source and the user's ability to adapt and program the ;; shiny some thousand money units worth machine in front of him. From ;; LISP machines to BSD to Mach message passing microkernel to ;; NextStep to ... but that is far away: for me it was from QBASIC to ;; RISC assembler to NetBeans to Dr. Racket to whatever comes in ;; handy. I hope your mailing list supports attachements: -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Flower Garden.rkt
Description: Binary data