|
| 1 | +# Riichi Round Flow Rules |
| 2 | + |
| 3 | +This document describes the formal round-flow rules used by the Riichi mode in this repository. |
| 4 | + |
| 5 | +## 1. Base Turn Flow |
| 6 | + |
| 7 | +- Seat winds stay fixed as East, South, West, North. |
| 8 | +- Turn progression follows East -> South -> West -> North. |
| 9 | +- Seat labeling remains East, South, West, North. |
| 10 | +- A normal turn is "draw one tile, discard one tile". |
| 11 | +- In normal flow, each player keeps 13 concealed tiles after finishing their discard. |
| 12 | + |
| 13 | +## 2. Draw Rules |
| 14 | + |
| 15 | +- Normal draw: when your turn begins and no call interrupts flow, draw from the live wall front. |
| 16 | +- Wall consumption is modeled as a single forward sequence from the live wall front. |
| 17 | +- Dead wall reserve: the last 14 tiles are reserved and not used for normal draws. |
| 18 | +- Kan supplement draw: after kan (ankan, minkan, kakan), draw one rinshan tile from the dead wall side and then discard. |
| 19 | +- Exhaustive draw: when the live wall is exhausted (only dead wall reserve remains), the hand ends in an exhaustive draw if nobody has won. |
| 20 | + |
| 21 | +## 3. Discard Rules |
| 22 | + |
| 23 | +- Every discard is public and tracked as part of each player's discard history. |
| 24 | +- A tile claimed by another player (chii/pon/minkan) is still treated as a tile that the discarder has discarded for furiten logic. |
| 25 | +- Open calls interrupt normal draw order and transfer turn control to the caller. |
| 26 | + |
| 27 | +## 4. Interrupting Actions |
| 28 | + |
| 29 | +- Chii: only the next player in turn order after the discarder may chii. |
| 30 | +- Pon: any non-discarding player may pon if legal. |
| 31 | +- Kan: any non-discarding player may minkan if legal; caller then performs a rinshan draw. |
| 32 | +- Ron: a legal ron claim immediately ends the hand. |
| 33 | +- Priority when multiple claims compete on one discard: ron > pon/kan > chii. |
| 34 | +- After chii/pon, the caller does not take a normal draw and must discard directly. |
| 35 | + |
| 36 | +## 5. Furiten |
| 37 | + |
| 38 | +- If your winning waits include a tile you have already discarded, you are furiten. |
| 39 | +- While furiten, you cannot win by ron. |
| 40 | +- While furiten, you may still win by tsumo if otherwise legal. |
| 41 | + |
| 42 | +## 6. Test Coverage Mapping |
| 43 | + |
| 44 | +Current automated tests explicitly protect: |
| 45 | + |
| 46 | +- turn progression order after a normal discard |
| 47 | +- chii eligibility limited to the next player |
| 48 | +- no normal draw before the caller's discard after chii |
| 49 | +- pon priority over chii on the same discard |
| 50 | +- furiten checks over discard history |
0 commit comments