powergrid/viewer/docs/tutorials
Eliott C. 5f2406ebb9
Add playable Powergrid tutorials and city income reference (#155)
* Add playable Powergrid tutorials and city income reference

* Space houses that share a city count so each one stays readable

The income row shortened the city-count cells, and the house markers were
packed to fit: 6px between columns against a 12px-wide house, and 3px
between rows. Two players on the same number — the ordinary case for most
of a game — overlapped by half and read as a single smudge; five or six at
the start of a game read as one blob.

Lay them out bottom-aligned in the cell instead, growing upward from the
income strip so the number above stays legible, a house-width between
columns and a house-height between rows. Five or six sharing go three wide
rather than three tall: a third row starts at the top of the cell and hides
the number completely, which is every game's opening position.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Lift dialogs above the status bar and complete the payment table

The status bar is sticky at z-index 10 and every modal sat at z-index 1, so
the bar painted over the top of any open dialog. Modals open 10vh down and
the bar is a fixed 40px, so on a short viewport — a phone held sideways —
the bar landed across the dialog's own header and covered the close button,
leaving no way out of the dialog at all. Put the modal above it; the bar is
then dimmed behind the overlay like the rest of the page.

The payment table counted to citiesToEndGame, which stopped one column short
of the number that ends the game, and a player can finish holding more cities
than that by building in the same phase as whoever triggered the end. Render
the whole table instead, so it agrees with the city track on the board.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: John Gold <goldjohn6@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 10:10:47 -07:00
..
desktop.png Add playable Powergrid tutorials and city income reference (#155) 2026-09-16 10:10:47 -07:00
income-track.png Add playable Powergrid tutorials and city income reference (#155) 2026-09-16 10:10:47 -07:00
mobile.png Add playable Powergrid tutorials and city income reference (#155) 2026-09-16 10:10:47 -07:00
README.md Add playable Powergrid tutorials and city income reference (#155) 2026-09-16 10:10:47 -07:00

Tutorial screenshots

Captured from the local tutorial preview using the same bundle as the ordinary viewer.

Desktop

The connections chapter highlights the city to build while keeping the normal board controls.

Connections chapter at 1280 pixels wide

City track

Houses mark cities built. The row below shows total income for that number of powered cities; the track wraps to two rows on portrait phones.

City track with income reference

Mobile

The income chapter distinguishes the three cities built from the two actually supplied with electricity.

Income chapter at 390 pixels wide