User Tag List

Results 1 to 2 of 2

Thread: Help needed with Mahjong

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2007
    Location
    UK
    Posts
    306
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Help needed with Mahjong

    Hi all,

    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.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2007
    Location
    UK
    Posts
    306
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Typical. After trying to solve this problem for over two days, I solved it last night about an hour after starting this thread. Difficult to explain, but I ended up using two loops: first scans through the group of destructible tiles and sets a global value to the current tiles tile-id. I then activate another loop to scan through the tiles, and set a different global value to the tiles_id. And then compare the two. If they match I add 1 to a counter. That mixed in with a few flags to prevent things being counted twice did the the job

Similar Threads

  1. 2D Mahjong Temple
    By Pharanygitis in forum Desktop Releases (PC & Mac)
    Replies: 2
    Last Post: 12th January 2014, 04:11 PM
  2. Mahjong solitaire/shanghai
    By Pharanygitis in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 4th July 2013, 03:52 AM
  3. Solitaire and Mahjong
    By tridado in forum File Archive
    Replies: 2
    Last Post: 22nd October 2011, 01:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •