Skip to content

1.16 part 10/18: Games: phone and landscape passes over the older games - #181

Closed
epheterson wants to merge 2 commits into
line/1.16.0-09-games-redfrom
line/1.16.0-10-games-phone
Closed

epheterson wants to merge 2 commits into
line/1.16.0-09-games-redfrom
line/1.16.0-10-games-phone

Conversation

@epheterson

@epheterson epheterson commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Part 10 of 18 of Zimi 1.16.0: Games: phone and landscape passes over the older games. Base: line/1.16.0-09-games-red (part 9); the diff shows only this part's files. The PR carries the not-a-release label and the version stays 1.15.7, so merging it cuts no release. Merge in order (1 to 17, then 18) with a merge commit, not a squash.

What this is

The phone and landscape pass over the older games: layouts for a short, wide screen, touch fixes, win and end-sheet fixes, how-to-play for Five Letters, and the play-testing bots and tests that found them. The part has two commits: the source changes, then the Games ZIM rebuilt from them (zimi/builtin/zimi_games_2026-11k.zim, taken from the release branch unchanged).

What changes

  • Card-game layouts for a short table (a phone on its side), each in its own *.js: cribbage.js (smaller board, crib and starter either side of it), bridge.js (bid grid fourteen to a row), koikoi.js (captured strip beside the opponent's hand), freecell.js (wide layout: cells left, foundations right), and smaller edits in gin.js, durak.js, holdem.js, blackjack.js, teenpatti.js, spider.js, pyramid.js and other card games.
  • fiveletters.js, fiveletters.html: a how-to-play sheet shown once on a device and behind a "?" button, three example rows, and half-key spacers so the middle keyboard row keeps key size. Its CSS rides in part 9.
  • koikoi.js: the win line is listed first, and the game declares listWin, finished and finishNow to the shared card shell for its end sheet.
  • memory.js: the picture sets are read from ZimiPictures (pictures.js, already in the tree) instead of being drawn inline; memory.html loads pictures.js.
  • stacker.js: the canvas scale is laid again before each draw, because a browser can drop canvas state.
  • zimcity-view.js: a paused city skips a frame when nothing it draws from has changed (_unchanged). zimcity/engine/budget.js: yearOf returns what a year costs and brings in; the budget uses it. zimcity.js, zimcity-tools.js, zimcity-modern.js, zimcity-sheets.js have small phone edits.
  • janggi-engine.js: in bikjang the pass is offered even in check. puzzles/zimi-fit.js: both "COMPLETED!" and "COMPLETE!" status lines count as a win (Same Game says the latter).
  • scripts/games_bot/: dev tools, not shipped. lib.py serves the games folder and opens a 390x844 touch phone, play.py drives the family games and solitaires by touch, bot3.py plays a card game to its end on a fake clock and keeps the finished state, play4.py reloads it with scores set for a win and a loss, flipsolve.py solves Flip.

How to review

  • Read first: bridge.js and cribbage.js (the g.short branches: geometry only, no game rules) and freecell.js (WIDE columns, the x() mapping used by cells, foundations and columns).
  • Then fiveletters.js (how-to-play, the stored "seen" flag) and koikoi.js (finished and finishNow must match what gameOver does).
  • Risk: touch handling on a phone (tap boxes, a sheet that reopens by itself), the end-sheet path of every converted card game, and janggi-engine.js move generation (the pass rule).
  • Skip: zimi/builtin/zimi_games_2026-11k.zim and its .source hash (built by python -m zimi.ownzims, --check is CI's gate).

Tests

  • Landscape (844x390): tests/test_games_landscape_browser.py, tests/test_games_landscape_overlaps_browser.py, tests/test_games_pa_boards.py, tests/test_games_pa_oddone_layout.py check that pills, trays, piles, the bid grid and boards do not overlap and that boards stay playable size.
  • Phone fit and touch: tests/test_games_phone_fit.py, tests/test_games_pa_touch.py, tests/test_games_pa_round4.py, tests/test_games_kart_touch_browser.py.
  • Ends and wins: tests/test_games_pc_ends_browser.py, tests/test_games_pc_puzzles_browser.py, tests/test_games_puzzles_solved_browser.py.
  • Five Letters: tests/test_games_five_how_browser.py, tests/test_games_five_tap.py.
  • Head title and ZimCity: tests/test_games_head_title_browser.py; the ZimCity browser tests cover the frame skip and budget.
  • Most of these need a browser and run in the whole matrix; the .cjs files are quick.

epheterson and others added 2 commits November 23, 2026 01:49
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@epheterson epheterson added the not-a-release Ships nothing; CI skips the version check label Nov 23, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Sorry @epheterson, your pull request is larger than the review limit of 150,000 diff characters

@epheterson
epheterson force-pushed the line/1.16.0-09-games-red branch from 1d0a378 to 9151986 Compare November 23, 2026 10:07
@epheterson
epheterson force-pushed the line/1.16.0-10-games-phone branch from 9883bfd to 36f1493 Compare November 23, 2026 10:07
@epheterson
epheterson force-pushed the line/1.16.0-09-games-red branch from 9151986 to fd2590f Compare November 23, 2026 10:52
@epheterson
epheterson force-pushed the line/1.16.0-10-games-phone branch from 36f1493 to 2784201 Compare November 23, 2026 10:52
@epheterson
epheterson force-pushed the line/1.16.0-09-games-red branch from fd2590f to 445cb99 Compare November 23, 2026 16:37
@epheterson
epheterson force-pushed the line/1.16.0-10-games-phone branch from 2784201 to 5c8fda1 Compare November 23, 2026 16:37
@epheterson
epheterson force-pushed the line/1.16.0-09-games-red branch from 445cb99 to 729e9a3 Compare November 23, 2026 16:44
@epheterson
epheterson force-pushed the line/1.16.0-10-games-phone branch from 5c8fda1 to 21a45d9 Compare November 23, 2026 16:44
@epheterson

Copy link
Copy Markdown
Owner Author

Reviewed here; included in the release PR #189.

@epheterson epheterson closed this Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-a-release Ships nothing; CI skips the version check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant