Repository navigation
Play page: the website's look, and placing ships you can see - #9
Merged
Merged
Conversation
- Same colours and type as the website (Newsreader, the stencil name, navy on chart paper); no capitals-only labels. The header is the name, linking to the website, and the session score; the tagline is gone, and the rules fold away under "Rules". - Placing: your chart and a dock of the five ships, each with its shape, its cells once placed (C2–C6, with a tick) or "Not placed". The ship in hand is highlighted in the dock and follows the cursor on the chart as a preview, red where it would overlap or run off the chart. Placing drops it with a short animation, says where it went, and hands you the next ship. Click a ship on the chart or in the dock to move it; Esc or clicking it again puts it back. Across / Down toggle (or R), Random, Clear, and Start battle, which waits until all five are placed. Enemy waters stay hidden until then. - Battle: enemy waters first, your chart beside it. Ships are drawn as rounded hulls on a layer under the cells, hits as crosses, misses as dots, the engine's last shot ringed; your sunk ships turn red, and the engine's fleet is outlined at the end. - Phones: compact dock rows, no keyboard hints on touch screens.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Browsers show the focus ring after any key press, so turning a ship with R right after placing one ringed the clicked cell. Rings now show only while navigating by keyboard (Tab or arrows); a pointer press turns them off again.
- Shading is now proportional to the engine's chance for each cell (was boosted 1.6x
and capped, so anything over about 60% looked certain), with a 0-100% scale beside
the toggle.
- Hovering a cell shows its chance ("G9: 65%"); screen readers get it in the label.
Cells stay enabled in battle (a disabled cell gets no hover) but leave the tab order.
- Game over no longer shows the forecast of the next fleet's spacing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redesign of
web/page.html, the browser game served at/playand offered as a download. The game logic and every call into the engine are unchanged.What changes
Look. The page now uses the website's colours and type: Newsreader for text, the stencil face for the name, navy on chart paper, and no capitals-only labels.
Placing ships.
Battle.
Phones. Dock rows are compact, and touch screens show no keyboard hints.
Checks
web/build.shbuilds the page with the engine.npm run build) passes and bundles the page as/play.