确定获胜的麻将牌

时间:2011-06-24 05:41:58

标签: mahjong

我正在努力找出麻将的胜利手,有没有人有任何提示或工作方式?

麻将游戏就像杜松子酒,有13张牌,4,3或3次冲球。获胜的手牌包括被盗或赠送的牌,共计14张牌。获胜的手牌是:

  • 3套4加1对
  • 4套3加1对。
  • 2套4加2套3,没有对。
  • 冲洗是3套,但所有套房都是奖金。
  • 所有配对也是一种选择。

还有与之相关的要点。

非常感谢任何指导或帮助。 要跟进并添加信息,这可能有助于其他人,并且可以帮助我们回答我们自己的问题,

我的目标是香港麻将规则。 当我使用算法时,我正在调查的是删除街道,如果失败,请删除该集。

works when I have a b3333 b4 b5 b666
check b345 - remove
check b345 fail, b333 is a set, remove
check b678, fail, b666 is a set.
none left, Win

but when I have a b222 b33 b44 b5. I need to skip and restart. check b234 ok, remove check b234 ok, remove check b234 fail, single b2 (Failed hand) restart, skip 1. check b345 ok, remove end, return to start check b234 ok remove check b234 fail, b22 is pair. none left win.

but this method is troublesome, because there could be a double state to retry. b222 b33 b44 b555 b66 b77 check b234 ok, remove check b234 ok, remove check b234 fail, resart, skip 1. check b345 ok, remove check b345 ok, remove check b567 ok, remove check b678 fail, no 7, skip one rety

任何想法?

1 个答案:

答案 0 :(得分:0)

我在Android中实现了一个成功的麻将游戏。我使用的算法如下:

1)将每个图块的出现次数计算为34的数组 2)删除所有可能的对 3)递归检查剩余的三元组瓷砖

希望有所帮助