Re: Bridge anyone? [not off topic]
Re: Bridge anyone? [not off topic]
- Subject: Re: Bridge anyone? [not off topic]
- From: Nigel Garvey <email@hidden>
- Date: Tue, 2 Nov 2004 20:48:04 +0000
I wrote just now:
>And of course that handler can be optimised still further: :-)
>
> on NewDeal()
> set new_hands to {{}, {}, {}, {}}
> set nh to {1, 2, 3, 4}
> repeat with c in cards
> set h to (some integer of nh)
> set hi to item h of new_hands
> set end of hi to contents of c
> if (count hi) is 13 then set item h of nh to missing value
> end repeat
> end NewDeal
Better still, use references to the properties:
on NewDeal()
set new_hands to {{}, {}, {}, {}}
set nh to {1, 2, 3, 4}
repeat with c from 1 to 52
set h to (some integer of nh)
set end of item h of my new_hands to item c of my cards
if (count item h of my new_hands) is 13 then set item h of nh to
missing value
end repeat
end NewDeal
NG
_______________________________________________
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