222eaf730f
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 13s
CI / ui (pull_request) Successful in 46s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m13s
A committed move that becomes illegal under a tightened rule (the single-word connectivity fix) makes engine replay fail, which left such games unopenable — an empty screen and an 'illegal play' error. Now the first open closes the game gracefully as a draw (engine.EndAborted -> end_reason 'aborted', no winner), preserves the journal, and surfaces an impersonal organizer note at the end of the move history and in the GCG export. - engine: EndAborted + Abort() (draw, no rack adjustment; winner -1). - service: replay aborts on ErrIllegalPlay; liveGame persists the void once (lazy, on open); GameState re-reads for the settled view. - store: VoidGame finishes the game and stamps a draw without a journal row. - migration 00002: allow end_reason 'aborted'. - ui: organizer note under the history grid; i18n en/ru. - docs: ARCHITECTURE 6/9.1, FUNCTIONAL(+ru), PRERELEASE MW3.
17 lines
781 B
SQL
17 lines
781 B
SQL
-- +goose Up
|
|
-- Allow end_reason = 'aborted': a game whose journal can no longer be reconstructed (a
|
|
-- recorded move became illegal under tightened rules) is closed as a draw rather than left
|
|
-- unopenable. See engine.EndAborted and Service.voidGame.
|
|
SET search_path = backend, pg_catalog;
|
|
ALTER TABLE games DROP CONSTRAINT games_end_reason_chk;
|
|
ALTER TABLE games ADD CONSTRAINT games_end_reason_chk CHECK (
|
|
end_reason IS NULL OR end_reason IN ('out_of_tiles', 'scoreless', 'resign', 'timeout', 'aborted')
|
|
);
|
|
|
|
-- +goose Down
|
|
SET search_path = backend, pg_catalog;
|
|
ALTER TABLE games DROP CONSTRAINT games_end_reason_chk;
|
|
ALTER TABLE games ADD CONSTRAINT games_end_reason_chk CHECK (
|
|
end_reason IS NULL OR end_reason IN ('out_of_tiles', 'scoreless', 'resign', 'timeout')
|
|
);
|