You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Return a tile that has already been generated instead of running it again #39
Generating a tile is expensive and the visualizer will ask for the same tile more than once as the user moves around.
Description
Before generating, ask the tile cache from #31 whether it already holds a finished grid for this tile seed and return that if it does. Otherwise generate it, put it in the tile cache, then return it.
A tile is identified by its seed, which already has the coordinate worked into it. Two different global seeds are two different worlds and must never share a tile.
Testing:
Assert asking for the same tile twice only runs the sampler once
Assert the second call returns the same grid as the first
Assert the same coordinate under a different global seed runs the sampler again
Activity