User Tag List

Results 1 to 5 of 5

Thread: Mahjong solitaire/shanghai

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export ModuleUnicode Add-on
    Pharanygitis's Avatar
    Join Date
    Aug 2006
    Location
    Germany
    Posts
    1,037
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Mahjong solitaire/shanghai

    Hey,
    currently, I have a problem. I'm working on a mahjong solitaire game in MMF2, but I don't how can I "generate" Mahjong-Fields (with a guaranteed solution) like this:
    http://www.mahjong-shanghai.de/

    ..any idea, how can I do this ?


    EDIT: I found the text about the problem but I don't understand the solution:
    "To generate a solvable position, a position is built where all 144 stones have the same face. Then a random solver picks pairs until the board is empty. Then, 72 faces (2 of each) are randomly applied to the 72 removed pairs of the original empty board. An exception is when not all stones can be picked and only 1 free stones (and an odd number of non-free stones) remain in the game: no more pairs can be removed. In this case, the algorithm is restarted."

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Basically what it's doing is that first it generates the layout of tiles with all tiles being blank... then it runs a "solver" which basically just picks any two open tiles, removes them, and assigns them a face. It keeps doing this until the board is empty.

    Then it generates the board again with all of the assigned faces.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    That would be an interesting example mfa. The example on my website does just random tiles so some tiles are repeated.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export ModuleUnicode Add-on
    Pharanygitis's Avatar
    Join Date
    Aug 2006
    Location
    Germany
    Posts
    1,037
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you @konidias, now I have created a good engine about Mahjong

    @Nivram, thank you, but the example on your page is not very good and don't work correctly. First, on your example are not enough different stones... in real Mahjong Solitare are 36 different Stones (36*4=144) !
    Second, I can't select some Stones that should work (I don't know why) ..
    And last: More stones on your example, and the match hasn't a guaranteed solution!

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    This is what I said about my example. Your selection of the stones in the example is not proper for the example. The stones are random which means there is not a win every time. The example is of a Mahjong type but not Mahjong, so of course there are not 36 different stones. Can we move on now? I ask for a mfa to improve or change the example(I have created a good engine about Mahjong you stated). You are not willing to share your engine? That is all I ask for. Not a critique on my example in this case.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. 2D Mahjong Temple
    By Pharanygitis in forum Desktop Releases (PC & Mac)
    Replies: 2
    Last Post: 12th January 2014, 03:11 PM
  2. Pyramid Solitaire Supreme
    By Keith in forum iOS Released Games & Apps
    Replies: 3
    Last Post: 27th March 2013, 02:24 AM
  3. Solitaire and Mahjong
    By tridado in forum File Archive
    Replies: 2
    Last Post: 22nd October 2011, 12: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
  •