Repository navigation
species-age-hunger-menu - #24
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
The meadow animal card now shows that animal's age and whether it is hungry or full, so a visitor inspecting one animal can see satiation and age, not only energy. Age is days lived, and a newborn shows 0. Hungry means energy is below that species' hunger line — the same read a day already uses to decide whether to hunt. A missing energy counts as 0, so the animal reads as hungry. Moving a hunger slider updates an open card immediately, because that slider is the line the next day will use, not a line stored from the previous day.
German says Alter, Hunger, hungrig, and satt. Satt, not voll, because voll is the wrong kind of full. A template copy of the hunger comparison was rejected so the page would not own a second day rule.
Changes
The meadow inspection contract and the lab capability now include age and hungry or full. Max age, the numeric hunger line, and species averages on the population strip stay off the card. No new dependencies.
Testing
Plan
Show age and hunger on the animal card
Share the meadow's age and hunger reads (
7329ddf)The day and the card now share one age and hunger read, so the card cannot drift from whether an animal would hunt.
A missing age is 0, and energy below the species hunger line is hungry. Missing energy counts as 0.
Rejected a template copy of that comparison, which would have given the page its own day rule.
Verified: npx ng test --watch=false --include=src/app/features/meadow/meadow-engine.spec.ts → 21 passed
Show age and hunger on the animal card (
a61239e)The animal card now shows age and hunger after energy, in English and German.
German uses satt, not voll, because voll is the wrong kind of full.
The first-paint height estimate went from 150 to 190 so the taller card does not clip before it is measured.
A hunger slider updates an open card immediately because the card reads the current slider, not a stored line from the last day.
Verified: - npx ng test --watch=false --include=src/app/features/meadow/meadow.component.spec.ts → 10 passed
npx ng test --watch=false --include=src/app/shared/i18n/i18n.service.spec.ts → 7 passed
Cover newborn, full, and slider updates (
7d627dc)The boundary tests lock the card to the day rule: missing age is 0, and hunger is only below the species line.
On the line the animal is full. Missing energy counts as 0, so it is hungry. A plant is never hungry.
The component test raises the plant-eater hunger slider and expects the open card to flip without a new day.
Verified: npx ng test --watch=false --include=src/app/features/meadow/meadow-engine.spec.ts --include=src/app/features/meadow/meadow.component.spec.ts → 33 passed
Record the card in the meadow spec (
0082156)The meadow inspection contract and the lab capability now include age and hungry or full, using the same hunger read as a day.
The card follows the hunger sliders immediately because those sliders are the next day's line, not a stored line from the previous day.
The temporary task spec was retired once that decision lived in the meadow spec.
Verified: spec_validate → no issues
Review: 0/4 steps reviewed in ThinkRail.