Making a Mahjong solitaire game and I'm trying to get my head around counting the number of identical pairs that can be destroyed. I'm using 144 tile actives:36 sets(4 instances in each set). All sets have been given a unique alterable value: tile_id(1 to 36) - and are placed under the group.qualifier 'friends' with another ID value that is spread across the group. Any tiles on the end of each row, that aren't overlapped by tiles on higher layers, have flag 0 turned on: making them destructible if their tile_IDs match.
Everything is working perfectly, but I need to be able to count how many destructible pairs can to be destroyed. Need to do this so I can add a 'hint' feature and so I can determine when the level is lost.
Any help, tips, ideas or example code would be appreciated. Thanks.