ramble 0.9.5: seed is sparse and scattered, not one in every square you have walked - #335
Merged
Conversation
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.
Seed spawned in every unlocked cell that was off cooldown. With a couple of dozen cells spread over ~1.8 km that carpeted the map, and most of what you could see sat well outside any walk. Tightening the zoom (#334) hid some of it; this fixes the cause.
Sparse, deterministic, and placed inside the cell
New
seedFor(cell, window, { rate })inwallet.js, copyingnestFor's trick deliberately:rate(default 4) carries seed, so a walkable frame holds a handful you can actually reach rather than one per square.seed.ratejoinsnest.rateas a live setting.The map and the harvest read the same rule
recordSeedPickupnow consults the sameseedForgate. Without that the map would be a liar in the other direction — showing seed in one cell in four while every cell quietly paid — and the pip would stop meaning anything. A cell that bears no seed pays nothing, and shows nothing.harvestableCellsreturns points rather than cell names, and the zones route passes them straight through, so a pip is drawn where the seed actually is.Verification
Full suite 4301/4301.
check-portsOK,build-registry --checkin sync. Backticks 0 and markup sinks 2 in the panel client. Docs updated in both languages, including the new settings row. Ramble 0.9.4 → 0.9.5.A test-design note worth flagging. Making seed sparse means a ledger test that just picks a cell now passes or fails on the spawn lottery rather than on the ledger. Rather than hunt for cells that happen to hash lucky — which would be a silent trap for whoever edits these next — the ledger tests take an explicit
everyCellBears()fixture that pinsseed.rateto 1, and the lottery gets its own tests. The zones route test does the same, for the same reason.New tests cover: determinism across calls, the point landing strictly inside its own cell and off-centre, a new window being a new roll, rate 1 vs rate 4 actually differing in how many cells bear seed, junk input not throwing (this runs on every zones fetch), and — the one that matters most — that a barren cell pays nothing and shows no pip, so the two rules can never drift apart.