Repository navigation
feat: 参加者の棄権(ドタキャン)を記録し、関係する試合を無効・不戦勝にする - #34
Open
polyacetal wants to merge 1 commit into
Open
polyacetal wants to merge 1 commit into
polyacetal wants to merge 1 commit into
Conversation
予選中の棄権は、その参加者を含む予選試合を記録済みも含めて無効試合にし、 順位表から外す。本戦中の棄権は、決着済みの結果を保ったまま未決着の試合を 相手の不戦勝にする。試合データは書き換えず判定時に棄権を反映するため、 取り消すと記録済みの結果が戻る。 Closes KPC-U16#32 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #32
概要
参加者が当日来ない・途中で帰った場合に、参加者単位で「棄権」を記録できるようにしました。
issue の「その参加者が含まれる試合をすべて無効試合とする」案をもとにしています。勝敗理由に「欠席」を足す形ではなく参加者に棄権を記録する形にしたため、残り試合を1つずつ入力する必要がありません。
動き
主な変更
packages/shared: 大会データにwithdrawals(既定値は空。既存の保存データもそのまま読めます)と、withdraw-player/reinstate-playerコマンドを追加packages/scoring: 棄権を反映した判定と状態「無効試合」を追加。判定はmatchResult(state, match)を通し、決着済みの判定はsettled(無効試合を含む)で数えるように変更chros/lib/tournament/players.ts: 棄権・取り消しの処理chros/public/manual/operations.html: 棄権の手順と、困ったときの表に1行を追加確認したこと
pnpm typecheck/pnpm format:check/pnpm buildpnpm test(棄権のテストを7件追加、計36件成功)scripts/smoke-prototype.mjsと、実サーバーへの API 経由での棄権・二重棄権の拒否・記録の拒否・取り消し未対応
🤖 Generated with Claude Code