Re: Bridge anyone? [not off topic]
Re: Bridge anyone? [not off topic]
- Subject: Re: Bridge anyone? [not off topic]
- From: Emmanuel <email@hidden>
- Date: Fri, 5 Nov 2004 09:14:09 +0100
At 8:51 PM -0500 04/11/04, David Andrews wrote:
If you move the property new_hands : {} out the script Bridge, then
you can check that all hands do not remain sorted:
On Nov 4, 2004, at 3:37 AM, Bernard Bernu wrote:
I thing this is a correct version, but probably not the fastest,
but the hands keep sorted. ;-)
property new_hands : {}
script Bridge
property cards : {"AS", "KS", "QS", "JS", "10S", "9S", "8S",
"7S", "6S", "5S", "4S", "3S", "2S", ¬
"AH", "KH", "QH", "JH", "10H", "9H", "8H", "7H",
"6H", "5H", "4H", "3H", "2H", ¬
"AD", "KD", "QD", "JD", "10D", "9D", "8D", "7D",
"6D", "5D", "4D", "3D", "2D", ¬
"AC", "KC", "QC", "JC", "10C", "9C", "8C", "7C",
"6C", "5C", "4C", "3C", "2C"}
-- (see above) property new_hands : {}
...
end script
...
tell Bridge to deal()
new_hands -->{{"KS", "9S", "3S", "AH", "JH", "10D", "9D", "6D",
"9C", "2D", "KH", "3C", "2C"}, {"10S", "8S", "7S", "6S", "2S", "KH",
"4H", "2H", "AD", "KD", "5D", "3D", "5C"}, {"AS", "5S", "10H", "6H",
"5H", "3H", "QD", "JD", "8D", "7D", "2D", "AC", "KC"}, {"QS", "JS",
"4S", "QH", "9H", "8H", "7H", "4D", "QC", "10C", "JC", "JD", "8C"}}
Now we got a new level of randomness: hands that you won't see in the
real world.
(no one has a 4 of clubs in these hands, but two players have the 2
of diamonds.)
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden