>> on CheckCards a1, a2
>> return 2*(a1 mod 2)=a2-a1+1
>> end
>
> Thanks, Jakob--you win the grand prize for thinking out of the box (if
> you're familiar with current American slang)!
Another 2 cents, aimed at the root of the problem - if I understand the
problem. A card is clicked. It needs to know two things - if there's a
"face-up" card, and what its personal match is. Store the "match" as
property of a mouseDown behavior attached to the card. Off the top of my
head:
-----------------------------
property pNeededCard, pMatch, pMyMember
on setProperties me, match, myMember
pMatch = match
pMyMember = myMember
pNeededCard = 0
end
on mouseDown me
if pNeededCard = 0 then
sendAllSprites(#oneUp, pMatch)
else
if pNeededCard = pMyMember then
--Victory dance
else
--Bummer
end if
pNeededCard = 0
end if
end
on oneUp me, match
pNeededCard = match
end
-----------------------------
You can do something similiar with matched sets by storing a list of
matches. Just attach the behavior to the card sprites on startmovie or
something, set each behavior's props, and you're all set. No need for a
manager object to get involved, just let the sprites fight amongst
themselves at this level.
- Kurt
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]