Skip to content

Species selection (fern / cactus / bonsai / sunflower) - #19

Merged
rwrife merged 1 commit into
mainfrom
issue-9-species
Jul 10, 2026
Merged

rwrife merged 1 commit into
mainfrom
issue-9-species

Conversation

@rwrife

@rwrife rwrife commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Closes #9

Adds --species so users can pick their plant's species, each with a full stage×health art set, plus a gameplay twist for the cactus.

What changed

  • New internal/species package: Kind enum (fern/cactus/bonsai/sunflower), case-insensitive Parse, and complete per-species art tables (every stage × health). Fern reuses the original art byte-for-byte, so the default is a no-op visual change.
  • Cactus twist: species can override wilt thresholds. The cactus stays healthy/thirsty far longer (~10 idle days before wilting vs. ~4 for others). Implemented via a new pure plant.ComputeWith(..., HealthTuning) — growth/streak are untouched, so a species can't fake progress, only survive a drought. plant stays I/O- and species-free (tuning passed in) to avoid an import cycle.
  • --species flag + config default: an explicit flag wins; otherwise the saved species in state.json is used; unknown names error with the valid list. A chosen species is remembered as the default for later flag-less runs.
  • Render: Options.Species and per-GardenPlant Species select the art set cleanly by (species, stage, health).
  • README: new Species section + interface/roadmap updates.

Acceptance criteria

  • --species flag + config default
  • At least 3 species with full stage/health art sets (4 shipped)
  • Cactus survives droughts longer (different wilt thresholds)
  • Render layer cleanly selects art set by species

Tests

New coverage in species, plant, and render: parse round-trips, art-table completeness/distinctness, ComputeWith-default == Compute, drought tolerance, and per-plant garden species. Full suite green; gofmt/go vet clean. Manually smoke-tested all four species, persistence, flag-less recall, and the unknown-species error.

@rwrife
rwrife merged commit 19fb4a4 into main Jul 10, 2026
1 check passed
@rwrife
rwrife deleted the issue-9-species branch July 10, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Species selection (fern / bonsai / cactus / sunflower)

1 participant