No description
  • JavaScript 89.1%
  • CSS 10.9%
Find a file
2026-10-01 14:01:36 +02:00
bgs Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00
docs Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00
engine Explain game flow and clarify building cards and action journal 2026-10-01 13:10:10 +02:00
scripts Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00
test Explain game flow and clarify building cards and action journal 2026-10-01 13:10:10 +02:00
viewer Give Puerto Rico a warmer island theme and clearer resource icons 2026-10-01 14:01:36 +02:00
.gitignore Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00
package.json Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00
pnpm-lock.yaml Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00
pnpm-workspace.yaml Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00
README.md Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00
release-config.js Add Puerto Rico Special Edition playable preview and modular engine 2026-10-01 12:46:56 +02:00

Puerto Rico: Special Edition

Local implementation for Boardgamers Space, targeting Puerto Rico 1897: Special Edition and the official June 2026 errata. Nothing has been uploaded or published.

pnpm install
pnpm dev
# http://127.0.0.1:5251/?locale=fr

The local preview lets you play one seat with two ordinary bots. Its initial building selection is performed automatically so you can start with role selection. The actual engine has the full shared building selection phase. Local progress is saved in the browser. The small local toolbar offers undo, opponent turns, restart and light/dark; it is absent from the hosted viewer.

Edition configuration

release-config.js defines one fixed Special Edition configuration. bgs/engine.js uses it regardless of creation-form expansion fields; the BGS metadata intentionally exposes no expansion picker or game options. The core engine in engine/index.js accepts independent expansion switches for future configuration, simulation and tests.

Implemented modules:

  • Base game, 2–5 players, including the classic two-player rules.
  • New Buildings: all 14 building types and cost-constrained shared market selection.
  • Citizens: 20 citizens, 8 building types, occupancy-dependent effects and scoring.
  • Smuggler: all four actions, role capture, surplus worker/citizen choices.
  • Festival: three shared objectives and physical resource reservations.
  • Festival Activities: all 12 activity definitions, three drawn per game.

Not complete: the 30-card Achievements deck has not been found in the official resources. It is deliberately not enabled or replaced with invented cards. Puertoma is not implemented; the preview bots use the normal human rules. See source notes, including a Festival/unique-building ambiguity that needs a ruling before release.

The engine accepts the optional costSwap, alternativeStart, tailorLimit and pairingRestrictions balance variants internally. They are disabled in the fixed configuration and not exposed in the UI.

Viewer and integration

  • French and English, using the platform locale; no language controls.
  • Distinct goods pictograms; color is supplementary.
  • Editable worker allocation, goods storage, building details, private shipping, final scoring.
  • Desktop and mobile layout, incremental DOM updates, native page and modal scrolling.
  • BGS chat and replay, concealed VP totals, server-only randomness and future draws.
  • Deterministic ordinary bots for local testing and BGS bot seats.

Validation

pnpm test           # rule scenarios, legal complete games, resource conservation, replay
pnpm build          # dist/engine.js, dist/viewer.js, local sandbox
pnpm test:browser   # 320/390/768/1440px, real viewer events, chat/journal scrolling

The implementation remains a preview pending playtesting, the missing card data, and the rule ambiguity noted above. Original vector UI artwork is in viewer/icons.js; reference scans in .local/ are ignored and never bundled.