An unallied sender can withdraw its unanswered offer during an ordinary Nexus. The table names the outgoing recipient and keeps this distinct from breaking a formed alliance. The chronicle now records named proposals, withdrawals and breaks. Existing authoritative quote, timing locks, readiness, physical custody, Nexus-card forfeiture and request/version handling remain unchanged. Full-table rendering checks cover owner/recipient/observer controls, replacement, withdrawal, incoming offers, break, blocked timing and JSON continuation. A production SQLite race permits exactly one acceptance or withdrawal at a version; a stale withdrawal cannot break an alliance formed by the accepted request. Private restored views and seat credentials remain intact. All four current AI profiles retain legal participation; no strategy or calibration changes. Independent review found no material issue. Types, lint, all 4973 offline tests, production build and 49 HTTP tests passed on stable source. Browser QA used a fresh three-human Basic lobby, genuine setup and a controlled later-Storm boundary with existing Spice Cards reordered; actual Storm/Worm resolution opened the Nexus. This is a focused position, not a full-game sample. Browser proposal, refresh, keyboard withdrawal, retained incoming invitation, acceptance, break and named chronicle entries passed. At390px the page375px and withdraw339px by46px fit, with16px text. Final refresh restored no offers or alliances. No screenshot was captured; full visual/assistive and all-configuration acceptance remain open. Browser lost-response injection was not performed. All 1459 original rooms, 3081 seats and auxiliary rows are unchanged. SQLite integrity and foreign keys pass. The healthy server was reused without restart, migration, reset or recurring maintenance. Full rules and expansion completion remain gated. The goal retains deferred full AI development, three adjacent approximate75% targets, no usage cutoff, selective subagents and verified Git pushes. Private evidence: 20260921-nexus-offer. Verified source tree: e44e61b651e66cad23326bcca3ba2eecd6bb5a779a16e0273db8d0039f453511
30 lines
1.5 KiB
TypeScript
30 lines
1.5 KiB
TypeScript
import assert from 'node:assert/strict';
|
|
import { applyAction, createGame, joinGame, newPlayer, type Game } from '../game/engine';
|
|
import { nexusReady, orderNexusSpice } from './fixture-nexus-cards';
|
|
|
|
/** Genuine Basic setup, then a controlled later-Storm boundary. Existing spice
|
|
* cards are reordered; actual storm/blow actions create the playable Nexus.
|
|
* This is a focused position, not a complete first-turn simulation. */
|
|
export function nexusOfferGame(ids: [string, string, string] = ['a', 'e', 'h'], code = 'NEXOFFER'): Game {
|
|
let g = createGame(code, newPlayer(ids[0], 'Atreides offerer', 'atreides'));
|
|
joinGame(g, newPlayer(ids[1], 'Emperor recipient', 'emperor'));
|
|
joinGame(g, newPlayer(ids[2], 'Harkonnen observer', 'harkonnen'));
|
|
for (const p of g.players) g = applyAction(g, p.id, { type: 'ready' });
|
|
g = applyAction(g, ids[0], { type: 'start' });
|
|
for (const p of g.players)
|
|
if (p.traitorChoices.length) g = applyAction(g, p.id, { type: 'traitor', leader: p.traitorChoices[0] });
|
|
assert.equal(g.status, 'playing');
|
|
Object.assign(g, { turn: 2, phase: 0, storm: 18, stormDials: {}, stormPending: null, ready: [] });
|
|
orderNexusSpice(g, ['worm', 'land']);
|
|
for (const id of g.stormDialers) g = applyAction(g, id, { type: 'stormDial', amount: 1 });
|
|
g = nexusReady(g);
|
|
assert.equal(g.phase, 1);
|
|
g = nexusReady(g);
|
|
assert.ok(g.spiceWindow);
|
|
g = nexusReady(g);
|
|
assert.ok(g.nexus);
|
|
assert.equal(g.spiceWindow, null);
|
|
assert.equal(g.spiceResolution, null);
|
|
return g;
|
|
}
|