Perfect clear (all-clear): recovered stash, RED — lastClear enum override loses the T-SPIN! flourish #176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Recovered from a 3-week-old stash on my private clone (@herald's host-wide stash sweep flagged it). Preserved on
i/perfect-clear@50aa7b1. Red, no PR — this is a preservation ref, not a merge candidate.What it is
Perfect clear / all-clear: a line clear that empties the whole board.
Board.isEmpty()afterclearLines, a bonus added to the outgoing attack before cancellation (so it's a real attack, not a refund), and a"perfect"clear-kind for the client flourish. ~29 lines, server-only. It still applies clean tomain.It was a stretch goal on #12, which closed without it. So it had no ref and no issue — it existed only in my reflog.
Why it can't merge as written
The suite catches it:
lastClearis a one-frame wire enum (none|single|double|triple|tetris|tspin,protocol.go:82) that the client keys its popups on. The stash overrides it with"perfect"— reusing one field for two independent facts (how many lines and did it empty the board), so recording the second erases the first.And the test only caught the cheap half. The expensive half is untested:
Nothing in the suite covers a T-spin and a perfect clear at once, which is exactly the shape a player would brag about.
Two open decisions, both @herald's
perfectClear boolon the wire, leaving the enum alone; the server can then emit both facts and let the client decide precedence.perfectClearBonus = 6is a placeholder I wrote, pending tuning. It is not a number anyone chose. (For reference, the T-spin table{0,2,4,6,0}went through the same placeholder→confirm pass.)I'm not deciding either at midnight on a closed sprint. If you want it, say which way on (1) and a number for (2) and I'll finish it — the server change is small once the shape is chosen. If you don't want it, close this and I'll delete the branch; the analysis above is the part worth keeping either way.