Skip to content

Apricot-S/block-decomposition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

block-decomposition

This project is a Rust port of Cryolite's C++ implementation of the algorithms for decomposing a given hand into blocks (winning form).

Original article (Japanese): 与えられた手牌をブロック(和了形)に分解するアルゴリズムについて(C++ 実装) #麻雀 - Qiita

Overview

This repository provides a standalone application for demonstrating mahjong hand decomposition algorithms.

Build and Run

Requires Rust 1.90+ and Cargo.

block-decomposition$ cargo run

Example Output

number of single color hands: 1723
max number of decomposition patterns: 4

map0 == map1
map0 == map2
map0 == map3

These results confirm that multiple algorithmic approaches produce equivalent decompositions.

License

This Rust port is licensed under the MIT No Attribution license.

The original algorithms and C++ implementation were described by Cryolite in the article linked above.

About

Rust implementation of mahjong hand decomposition

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages