To count the matching tiles, follow the ensuing steps:
CountGems
into the game
class. The parameters are the first and second object.Method CountGems:Int(obj1:ftObject, obj2:ftObject)
x
and y
positions of the objects.Local x1:Int Local y1:Int Local x2:Int Local y2:Int
Local gemCountX1:Int Local gemCountY1:Int Local gemCountX2:Int Local gemCountY2:Int
x1 = GetSlotX(obj1) y1 = GetSlotX(obj1) x2 = GetSlotX(obj2) y2 = GetSlotY(obj2)
gemCountX1 = CheckGemsX(x2, y2, obj1.GetTag()) gemCountY1 = CheckGemsY(x2, y2, obj1.GetTag())
gemCountX2 = CheckGemsX(x1, y1, obj2.GetTag()) gemCountY2 = CheckGemsY(x1, y1, obj2.GetTag())
Return Max(Max(gemCountX1, gemCountY1),Max(gemCountX2, gemcountY2)) End
3.144.228.78