Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/poker-sang/mahjong
非查表式日本麻将听牌算法(C#、C++和C++/CLI)
https://github.com/poker-sang/mahjong
cpp cpp20 cppcli csharp mahjong wpf
Last synced: about 1 month ago
JSON representation
非查表式日本麻将听牌算法(C#、C++和C++/CLI)
- Host: GitHub
- URL: https://github.com/poker-sang/mahjong
- Owner: Poker-sang
- License: mit
- Created: 2021-10-10T05:25:29.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T10:29:00.000Z (5 months ago)
- Last Synced: 2024-07-25T11:58:07.675Z (5 months ago)
- Topics: cpp, cpp20, cppcli, csharp, mahjong, wpf
- Language: C++
- Homepage: https://www.bilibili.com/read/cv4601162
- Size: 337 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mahjong
**不使用**查表法和遍历法的高效日麻判听牌算法。
长期维护的算法介绍文档:《[日麻听牌判断归类算法](https://www.bilibili.com/read/cv4601162)》,大致原理是对牌组进行分类剪枝。
完整型判断Lv.1
完整型判断Lv.2
~指“不完整型”
牌数
IntegrityType
类型名
判断听牌方法
备注
3n
Type0
完整型
直接判断(IntegrityJudge())
TypeEx
雀半不完整型
去对+取坎张
半~与雀头~合并而成
3n+1
Type1
半不完整型
取坎张(会成对出现)
雀面不完整型
遍历+去对
雀头~与面子~合并而成
3n+2
Type2
雀头不完整型
去对(去掉一个对子)
面子不完整型
遍历(3-9次)+与前后块连接
仓库提供C#、C++ (Standard: 20)、C++/CLI三种语言实现,也可以按照文档用其他语言实现。
若有BUG欢迎提[ISSUE](https://github.com/Poker-sang/Mahjong/issues)
## LICENSE
[MIT LICENSE](https://github.com/Poker-sang/Mahjong/blob/master/LICENSE)