GEN-4: Dilute-Präfix, REW-Erkennung, CP-Fuchs-Fix, BreedingResultView Gencode+Layout
Katalog (catalog.ts): - 8 'X dd'/'dd X' Einträge → 'Dilute X' (Agouti/Silberagouti/Kohlfuchs/Anthrazit/ Topas/Blaufuchs dd + dd Gold/Platin → Dilute Gold/Platin etc.) - 4 neue Dilute-Fuchs-Basiseinträge (Dilute Algierfuchs/Goldfuchs/Rotfuchs/Polarfuchs) → verhindert naked 'Fuchs' Fallback für agouti+dilute+fox Genotypen. 66→70 Einträge. - colourpointName: 'Dilute X' Base → 'Dilute CP-X' statt 'CP-Dilute X' (Präfix-Reihenfolge) → AA cchmcchm dd ee GG PP = 'Dilute CP-Algierfuchs' statt 'CP-Fuchs'. Engine (farbschlagFor): - REW-Check: c0==cchm && c1==cchm && p0==p && p1==p → 'REW' (Rotaugenweiß). Unabhängig von A/D/E/G. Flagged to god zur Bestätigung. BreedingResultView: - Gencode (bracket notation) pro Farbschlag-Karte (erster/wahrscheinlichster Genotyp). - Layout-Fix: flexbox body (name+gencode gestapelt), min-width:0 gegen Overflow, word-break, grid min 15rem, prob flex-shrink:0 rechtsbündig. Tests: GEN-4 describe (Dilute/REW/no-bare-Fuchs Fixtures); CATALOG_SIZE 66→70; CP-Fuchs/CP-Fuchs-Hell → Dilute CP-Algierfuchs(-Hell) in bestehenden Tests. Gate: build ✓ eslint ✓ vitest 95/95 ✓ e2e 148/148 ✓
This commit is contained in:
@@ -43,16 +43,29 @@ export default function BreedingResultView({ result, title }: BreedingResultView
|
||||
) : (
|
||||
<>
|
||||
<ul className="farbschlag-cards">
|
||||
{result.byFarbschlag.map((f) => (
|
||||
<li key={f.farbschlag} className="farbschlag-card">
|
||||
<FarbschlagImage name={f.farbschlag} />
|
||||
<span className="farbschlag-card__name">{f.farbschlag}</span>
|
||||
<span className="farbschlag-card__prob">
|
||||
{f.probability.percent}
|
||||
<small> ({f.probability.text})</small>
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
{result.byFarbschlag.map((f) => {
|
||||
// Representative genotype: highest-prob offspring for this farbschlag.
|
||||
const repGenotype = result.offspring.find(
|
||||
(o) => o.farbschlag === f.farbschlag,
|
||||
)?.genotype
|
||||
return (
|
||||
<li key={f.farbschlag} className="farbschlag-card">
|
||||
<div className="farbschlag-card__img">
|
||||
<FarbschlagImage name={f.farbschlag} />
|
||||
</div>
|
||||
<div className="farbschlag-card__body">
|
||||
<span className="farbschlag-card__name">{f.farbschlag}</span>
|
||||
{repGenotype && (
|
||||
<code className="farbschlag-card__geno">{repGenotype}</code>
|
||||
)}
|
||||
</div>
|
||||
<span className="farbschlag-card__prob">
|
||||
{f.probability.percent}
|
||||
<small> ({f.probability.text})</small>
|
||||
</span>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user