// Every face lays its own paper (the card architecture, 28 Oct 2026): each// face's file declares the stock it is printed on beside the face, its body// lays that declaration (`scripts/gen-faces-registry.py` refuses a face that// lays any other), and the registry keeps it by id for the sheets under the// card (`FaceRegistry.stock`). Each is the stock its kind's cards have always// stood on; the faces that draw their own sheet or object lay none and stand// on the framed stock's sheets. Beside its stock each declares the ground its card// lies on (`FaceRegistry.ground`): the paper ground, or a ground of its own.importCottonFacesimportCottonPaperimportCottonValuesimport XCTestfinalclassFacePaperTests: XCTestCase {/// The stock each face's card is printed on, by face id.staticfunc stock(of face: String) -> FaceStock {switch face {case"subscription", "sharmila.membership", "list.cassette", "song.cassette", "podcast.radio", "note.page": .owncase"person.rolodex", "event.rolodex", "person.file", "person.passport", "thread.slips": .owncase"todo.card": .owncase"book.hardback", "film.vhs", "film.poster", "episode.lobby", "season.card": .owncase"photo.print", "album.board", "album.carousel": .owncase"journal.diary": .owncase"page.clipping", "highlight.passage": .owncase"call.slip", "person.telephone": .owncase"health.pedometer", "health.stopwatch", "health.tag": .owncase"transaction.receipt", "transaction.cheque", "account.statement": .owncase"song.hifi", "song.turntable", "song.party", "song.amp", "song.single", "artist.divider", "album.sleeve": .owncase"album.tray", "song.tray": .owncase"scene.card", "scene.chat", "character.card", "place.card", "story.card", "note.card": .owncase"sharmila.studio": .ornamentedcase"video", "birthday", "episode", "track", "group","music.album", "music.playlist", "sharmila.trainer", "sharmila.client": .creamdefault: .framed } }/// RULE: Every registered face is printed on the stock its kind's cards stand on, as its file declares it; a subscription, a membership, a cassette, a radio, a torn page, a rolodex, an index card, a recipe tin, a standing hardback, a video, a lab print, an album board, a slide carousel, a diary, a page's clipping, a highlight's torn strip, a call's memory slip, a contact's card by the telephone, a receipt, a cheque, an account card, a hi-fi deck, an amp head, a single, a crate divider, an album's sleeve, a film's one-sheet in its frame, an episode's lobby card, a season's card and Cotton Story's six flat cards lay none. @MainActor func testEveryFaceIsPrintedOnItsKindsStock() {for face inFaceRegistry.all { XCTAssertEqual(FaceRegistry.stock(face.id), Self.stock(of: face.id), face.id) } XCTAssertEqual(Set(FaceRegistry.all.map(\.id)), FaceRegistry.ids, "the registry keeps a stock for a face it does not draw") }/// The ground each face's card lies on, by face id.staticfunc ground(of face: String) -> FaceGround {switch face {case"event.rolodex": .kitchenTilecase"note.page": .feltOrangecase"person.rolodex", "person.file", "person.passport": .amethystDeskcase"todo.card": .baizeTealcase"thread.slips": .pegboardcase"film.vhs": .claretcase"album.board": .bookclothcase"photo.print", "album.carousel": .darkroomBenchcase"page.clipping": .cobaltEnamelcase"call.slip", "person.telephone": .leatherDeskcase"health.pedometer", "health.stopwatch", "health.tag": .slatecase"transaction.receipt", "transaction.cheque", "account.statement": .terrazzocase"podcast.radio": .formicaCountercase"journal.diary": .bedsideTablecase"book.hardback", "highlight.passage": .feltNavycase"song.hifi", "song.turntable", "song.amp", "song.single", "artist.divider", "album.sleeve", "list.cassette", "song.cassette": .tolexcase"album.tray", "song.tray": .tolexcase"song.party": .partyFloorcase"scene.card", "scene.chat", "character.card", "place.card", "story.card", "note.card": .blankcase"film.poster", "episode.lobby", "season.card": .velvetdefault: .paper } }/// RULE: Every registered face declares the ground its card lies on, kept by its id: every paper face the paper ground, which is the page ground Cotton's deck stands on and is light; the event's rolodex the calendar's kitchen tile, the torn page the notes' burnt-orange felt, the index card the todos' teal baize, the rolodex the people's walnut, the thread's slips the messages' pegboard, the video the films' claret baize, the album board the Photos tool's bookcloth, the lab print and the slide carousel the Photos darkroom bench, the diary the journal's bedside table, a call's memory slip and a contact's card by the telephone the calling desk's oxblood leather, a page's clipping the Pages café marble, the money's objects its pink terrazzo, the podcast's radio the podcasts' mint formica counter, the recipe tin the recipes' scrubbed pine table, the standing hardback and a highlight's torn strip the books' navy felt and the hi-fi deck, the turntable, the amp head, the single, the crate divider, the album's sleeve, the tray and the list's and the song's cassette the music's black tolex, the party's turntable its dance floor and a film's one-sheet, an episode's lobby card and a season's card the Picture House's velvet, Cotton Story's six flat cards its blank ground (light in a light phone), the dark ones taking the light ink and the light ones (the kitchen tile, the pegboard, the rose linen, the terrazzo, the formica, the pine) the dark, by their colours' luminance. @MainActor func testEveryFaceLiesOnItsGround() {for face inFaceRegistry.all { XCTAssertEqual(FaceRegistry.ground(face.id), Self.ground(of: face.id), face.id) } XCTAssertNil(FaceRegistry.ground("no.such.face")) XCTAssertFalse(FaceGround.paper.dark) XCTAssertFalse(FaceGround.blank.dark) XCTAssertTrue(FaceGround.felt.dark) XCTAssertTrue(FaceGround.claret.dark) XCTAssertTrue(FaceGround.bookcloth.dark) XCTAssertTrue(FaceGround.feltNavy.dark) XCTAssertTrue(FaceGround.tolex.dark) XCTAssertTrue(FaceGround.partyFloor.dark) XCTAssertTrue(FaceGround.velvet.dark) XCTAssertFalse(FaceGround.kitchenTile.dark) XCTAssertTrue(FaceGround.amethystDesk.dark) XCTAssertFalse(FaceGround.pegboard.dark) XCTAssertFalse(FaceGround.roseLinen.dark) XCTAssertTrue(FaceGround.feltOrange.dark) XCTAssertTrue(FaceGround.baizeTeal.dark) XCTAssertFalse(FaceGround.terrazzo.dark) XCTAssertTrue(FaceGround.tealLeather.dark) XCTAssertTrue(FaceGround.checker.dark) XCTAssertTrue(FaceGround.deskMat.dark) XCTAssertFalse(FaceGround.formicaCounter.dark) XCTAssertTrue(FaceGround.darkroomBench.dark) XCTAssertTrue(FaceGround.bedsideTable.dark) XCTAssertTrue(FaceGround.cobaltEnamel.dark) XCTAssertTrue(FaceGround.leatherDesk.dark) XCTAssertTrue(FaceGround.slate.dark) }/// RULE: The sheets under a card are its face's stock — a card that draws its own sheet the framed stock's — and the pace band's for an id this build has no face for, as the plain face draws it.func testTheSheetsUnderACardAreItsFacesStock() { XCTAssertEqual(FaceRegistry.sheetsUnder("sharmila.studio", pace: .soon), .ornamented) XCTAssertEqual(FaceRegistry.sheetsUnder("subscription", pace: nil), .framed) XCTAssertEqual(FaceRegistry.sheetsUnder("plain", pace: .soon), .framed) XCTAssertEqual(FaceRegistry.sheetsUnder("no.such.face", pace: .soon), .pace(.soon)) XCTAssertEqual(FaceRegistry.sheetsUnder("no.such.face", pace: nil), .pace(.someday)) }}