Credibility pass: one conflict check, one hostile list, one set of chrome
Duplicated logic and styling that had drifted apart is unified: the gesture-sharing check, the hostile spell list, the enchanted test, the plan limits, and the shared button, link, field and disabled styles. Dead plumbing is gone: the always-true implemented flag, the unread cast length, an unreachable guard, an impossible time-stop condition, the unused sequence formatter and utility class, the template placeholder. The counter-spell tests now put a counter-spell in front of a spell, the test helpers live in one file, and the resolver's sections are numbered in order. The deploy script's cache headers now do what its comment says, and the README describes the screen rather than listing features in the order they arrived. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
527820ee95
commit
5de352db43
@@ -108,19 +108,16 @@ export function usedCells(completion: Completion, hand: Hand, turnCount: number)
|
||||
return cells;
|
||||
}
|
||||
|
||||
export function cellsOverlap(a: Set<string>, b: Set<string>): boolean {
|
||||
for (const cell of b) if (a.has(cell)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** No gesture may complete more than one spell. */
|
||||
export function castsConflict(
|
||||
a: { completion: Completion; hand: Hand },
|
||||
b: { completion: Completion; hand: Hand },
|
||||
turnCount: number
|
||||
): boolean {
|
||||
const cellsA = usedCells(a.completion, a.hand, turnCount);
|
||||
for (const cell of usedCells(b.completion, b.hand, turnCount)) {
|
||||
if (cellsA.has(cell)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function formatSequence(spell: Spell, seqIndex = 0): string {
|
||||
return spell.sequences[seqIndex];
|
||||
return cellsOverlap(usedCells(a.completion, a.hand, turnCount), usedCells(b.completion, b.hand, turnCount));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user