// The sheet a dealer opens mid-argument. // // It held twelve rulings with all their prose showing — 2,480px of it on a 390px // phone, of which 1,754 was below the fold — and a row of twelve chips across the top // to jump between them. The chips were an index of the twelve headings printed directly // above the same twelve headings: the same list twice, 172px of navigation before the // first word, and the dealer who used one landed in the middle of a scroll with eleven // rulings they hadn't asked for still wrapped around them. // // The headings are the index now. NN/g's rule for this shape — a longer list of // independent topics somebody opens one of — is an accordion, shut by default, and // half of these headings answer the question without being opened at all: "A short // all-in doesn't reopen the betting" is the ruling, not the topic. Measured after: // 29px below the fold on an iPhone with all twelve rows on screen at once, 51px on a // desktop. Opening the longest of them leaves 244px. // // These are layout and markup decisions, so they are checked as text — except the one // about what the sheet does when it is opened again, which is behaviour and lives in // main.js. const test = require("node:test"); const { describe } = require("node:test"); const assert = require("node:assert"); const fs = require("fs"); const path = require("path"); const ROOT = path.join(__dirname, "..", "..", "JoshHeaps.Net"); const PAGE = fs.readFileSync(path.join(ROOT, "Pages", "Casino", "TexasHoldem.cshtml"), "utf8"); const CSS = fs.readFileSync(path.join(ROOT, "wwwroot", "css", "casino", "holdem.css"), "utf8"); const MAIN = fs.readFileSync(path.join(ROOT, "wwwroot", "js", "casino", "holdem", "main.js"), "utf8"); const sheet = () => { const at = PAGE.indexOf('