feature/Game #7

Closed
nseon wants to merge 0 commits from feature/Game into master
Owner
No description provided.
Games now loop until the player quits: each answer shows a result card
with a next button, and the clicked and right countries are colored on
the globe in clickCountry mode.
Country shapes and one label point per country, with the names in every
language Natural Earth provides.
Served locally so the labels no longer depend on the demotiles fonts
and cover non latin alphabets.
The base style, the country colors and the labels now come from local
data, which removes the Crimea, Palestine and South Sudan workarounds.
Country and region labels follow the browser language, with right to
left support.
- the game is created once, each country comes from /<mode>/question
- the game ends when the server answers 409
- played countries stay green or red until the end of the game
- a wrong answer shows the right country in yellow, then red on the next one
- the wrong guess is outlined in red
- the score shows how many countries were played
- the page uses the dynamic viewport height and the viewport meta is fixed
- the root font size scales with the screen
- the search bar, game cards and buttons move and shrink on small screens
- the goal card is hidden once the game is over
- the score uses text-xl instead of the text-xls typo
- the menu offers the world or any mix of continents
- while the menu is open, clicking the globe picks a whole continent
- countries outside the zone are darkened and can't be clicked
- the chosen zones are sent to the server when the game starts
- Greenland is played as its own country
- the Baikonur hole is removed from Kazakhstan and its own shape is dropped
- its label point is removed from the country labels
- its region now belongs to Kazakhstan
The name sent no longer depends on the language of the input, so
"république démocratique du Congo" and "DR Congo" are both accepted.
- any country of the zone can be clicked, it turns yellow and the search bar shows up
- the guess sends the typed name and the latlng of the clicked country
- there is no question endpoint, the next round waits for a click
- a missed country turns red and can't be played again
- the progress uses the total sent by the server
- a guess refused by the server (400, 409) unselects the country
The server only knows continents, so "World" made the start fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	.devcontainer/devcontainer.json
#	src/App.tsx
#	src/main.tsx
- layers.ts: initLayers returns handles to show, hide and color the game layers
- behaviors.ts: grab, hover, select and clickGuess are composable behaviors
  attached to a layer, replacing initActions and its flags
- views.ts: each mode describes its labels, guess layer and behaviors
- Globe.tsx only keeps the React component
# Conflicts:
#	src/Globe.tsx
nseon closed this pull request 2026-10-26 15:29:27 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Terranaut/frontend!7
No description provided.