From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-Thread: fdb77,5f529c91be2ac930 X-Google-Attributes: gidfdb77,public X-Google-Thread: 1108a1,59ec73856b699922 X-Google-Attributes: gid1108a1,public X-Google-ArrivalTime: 2003-05-11 17:49:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc03.POSTED!not-for-mail Message-ID: <3EBEEFA0.8060008@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.java.advocacy,comp.object,comp.lang.ada Subject: Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died) References: <9fa75d42.0304230424.10612b1a@posting.google.com> <4a885870.0304291909.300765f@posting.google.com> <416273D61ACF7FEF.82C1D1AC17296926.FF0BFD4934A03813@lp.airnews.net> <9fa75d42.0305010621.55e99deb@posting.google.com> <0-WcnWfafqsNpiyjXTWcqw@gbronline.com> <1051804573.732603@master.nyc.kbcfp.com> <3EBE9BD4.1050008@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1052700578 24.62.164.137 (Mon, 12 May 2003 00:49:38 GMT) NNTP-Posting-Date: Mon, 12 May 2003 00:49:38 GMT Organization: AT&T Broadband Date: Mon, 12 May 2003 00:49:38 GMT Xref: archiver1.google.com comp.lang.java.advocacy:63541 comp.object:63220 comp.lang.ada:37214 Date: 2003-05-12T00:49:38+00:00 List-Id: John R. Strohm wrote: >>for I in 0..Number_of_Hands - 1 loop > > There is ABSOLUTELY NO EXCUSE in Ada for the above. Human beings learn to > count starting at "one", not "zero". >> Deck: Card_Array(0..51); > Same comment. Well, excuse me! I did not write that because I am a closet C programmer. I wrote that in both cases because those values are used in mod operations, the deck when initializing cards, the Number_of_Hands in determining vulnerability and dealer. In both cases, I could either have expressions like (I-1) mod 13 + 1, or I mod 13. Guess which I chose. > Actually, with a Tarot deck, it would be a bit harder. You have the four > different suits, and the various numbered cards, but you also have the > various special cards (e.g., the Fool, the Tower, Death...) that have to be > handled separately. Not that much, at least with the Tarot decks I have used. They have 22 Major Arcana and four suits of 14 cards in the Minor Arcana for a total of 78 cards. It would be pretty easy to have six suits of thirteen cards and special names for the cards in two of them (including the four Pages from the Minor Arcana). Or you could just generate the names in the Minor Arcana, and fill in the Major Arcana last. Since the names are assigned to the cards once, and from then on printed/displayed, it would take very little additional code. A little more difficult would be adding a bit for reversed, and flipping it randomly during shuffling. Hardest part would be remembering the names of the Major Arcana, but what else is Google for: http://www.byzant.com/tarot/structuremajor.asp ;-)