global card, equal_value, hots, foundation, tableau
if sprite(me.spriteNum).blendLevel <> 0 then
if (the clickOn <> 0) and (the clickOn <> me.spriteNum) then
if sprite(the clickOn).visible = 1 then
if sprite(the clickOn).moveableSprite = 1 then
hots = me.spriteNum
if objectp(tableau[string(sprite(the clickOn).startFrame).symbol].cards[string(the clickOn).symbol]) = 1 then
if tableau[string(sprite(the clickOn).startFrame).symbol].cards[string(the clickOn).symbol].compare_suit(foundation[string(me.spriteNum).symbol].cards[foundation[string(me.spriteNum).symbol].cards.count]) = 1 then
if tableau[string(sprite(the clickOn).startFrame).symbol].cards[string(the clickOn).symbol].compare_rankvalue(foundation[string(me.spriteNum).symbol].cards[foundation[string(me.spriteNum).symbol].cards.count]) = 1 then
equal_value = 1
else
equal_value = 0
end if
end if
end if
end if
end if
end if
else
if (the clickOn <> 0) and (the clickOn <> me.spriteNum) then
if sprite(the clickOn).moveableSprite = 1 then
if sprite(the clickOn).visible = 1 then
hots = me.spriteNum
if objectp(tableau[string(sprite(the clickOn).startFrame).symbol].cards[string(the clickOn).symbol]) = 1 then
if tableau[string(sprite(the clickOn).startFrame).symbol].cards[string(the clickOn).symbol].rankvalue = foundation[string(me.spriteNum).symbol].cards[foundation[string(me.spriteNum).symbol].cards.count] then