miaoda-game-thirteen-water-analysis-core
v0.2.0
Published
Pure 13-card Chinese Poker partition, hand comparison, and foul analysis.
Maintainers
Readme
miaoda-game-thirteen-water-analysis-core
Pure analysis for a physical 13-card Chinese Poker/Thirteen Water hand. It evaluates the three-card front and five-card middle/back, enforces front <= middle <= back, detects fouls, and enumerates canonical 3/5/5 partitions. Multiplayer settlement and strategy live elsewhere.
pnpm add miaoda-game-thirteen-water-analysis-core miaoda-game-texas-holdem-rulesconst choices = enumerateThirteenWaterPartitions(hand, {maxResults: 100});
const first = choices.partitions[0];
const result = analyzeThirteenWaterPartition(hand, {
frontCardIds: first.frontCards.map(card => card.id),
middleCardIds: first.middleCards.map(card => card.id),
backCardIds: first.backCards.map(card => card.id),
});The front recognizes only high card, pair, and three-of-a-kind; three-card straights/flushes gain no category. Enumeration examines all 72,072 physical partitions. maxResults limits retained results; check totalCount/truncated. Stable order is not strategic ranking.
