Commit graph

13 commits

Author SHA1 Message Date
cc865cfcbb Prepare Fuji 0.1.13 engine-only public beta update 2026-11-14 01:26:33 +00:00
0c59dab3d1 Undo against bots: replay to BGS log positions (engine 0.1.12)
BGS undoes the only human's last saved move by calling replay(data, { to })
with the log length recorded before that move, and requires
logLength(result) === to. The wrapper passed `to` to the internal replay as
a history index, so most undo requests failed or landed elsewhere; admin
replays, which also send log positions, had the same problem.

With a position, replay now rewinds to the first point where the journal
reaches it, then reapplies later name changes and drops, and does not queue
chat announcements of replayed moves again. Choices that add no journal
entry (live route and readiness edits, preparation before the last player is
ready) are not restored: undoing one reopens them for every player, and the
bots choose again. replay(data) without a position, createAnalysis and the
internal history-index replay are unchanged.

Tests play complete 2-4 player games against bots: every undo point reaches
its log length and deep-equals the saved state unless unannounced choices
preceded the move; otherwise the reopened phase stays playable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:59:26 +02:00
a2ce650d6c Offer "Undo my move" in games against bots
BGS lets the only human of a game against bots take back their last saved
move (protocol 0.10.0). The header utilities show an undo control while BGS
reports it available to the seated player, except in analysis and while a
move awaits the next state; it asks BGS to undo, which then sends the
earlier state. A state that goes backwards stops playback and discards local
selections (dice, equipment forms, lava warnings). The local harness offers
the same control after each move made from the interface.

Upgrade @boardgamers/protocol from 0.6.1 to 0.10.0 (older versions drop
undo:available) and remove the 0.6.1 chat scrolling patch: 0.10.0 ships the
same fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:38:06 +02:00
b8c7ebbdaf Use the shared BGS color-blind preference 2026-09-23 19:45:18 +02:00
74507bc2ed Use shared BGS viewer and chat protocol 2026-09-13 20:14:09 +02:00
c1d2738f5c Add chat mentions, rich messages and scenario labels 2026-09-13 17:15:36 +02:00
0907ad6b7b Allow cooperative choices to reopen with fair time credits and improve mobile controls 2026-09-11 11:29:54 +02:00
cbf50defbd Integrate platform chat with persistent drafts and local harness support 2026-09-10 14:23:27 +02:00
1696fdd0ce Export shared moveAI and spend bars to secure movement 2026-09-08 16:47:14 +02:00
27420b6caa Resolve journeys after Gatherer decisions and record dice snapshots in journal 2026-09-08 15:44:23 +02:00
85786640b3 Add accessible color preferences and clarify map requirements and destinations 2026-09-08 14:40:02 +02:00
1c99c9c30f Support BGS live planning updates with bounded replay snapshots 2026-09-08 14:04:09 +02:00
1b5cff1241 Implement playable Fuji scenario one with BGS engine and Svelte viewer 2026-09-08 11:04:08 +02:00