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
Expand a request up to a whole number of windows #66
Terrain is generated by laying windows over a region, so a region has to be a whole number of windows across. A request for any other size cannot be generated as it stands.
Description
Work out, from what was asked for, the region that will actually be generated. It is the smallest region that covers the request and is a whole number of windows on each side.
The expanded region sits on the same world grid the windows do, so expanding a request does not shift where its terrain comes from. Asking for the same area twice must expand to the same region both times.
Testing:
Assert a request that is already a whole number of windows is left as it is
Assert a request smaller than a single window expands to one window
Assert a request that is not a whole number of windows expands to the next whole number on each side
Assert the expanded region covers every cell that was asked for
Assert the same request expands to the same region every time
Activity