five-on-it / apps/client/src/ui/studio/region
apps/client/src/ui/studio/region
The studio's edits of a region spec, each a pure function from a spec to the next: a feature of the land (a hill, a mountain, a plateau, a valley, a lake, a volcano, a ski run), a road over the tiles clicked (from, by way of, to: a tile, or the feature or town clicked on), a town or a landuse area put where the owner clicked; one replaced, removed, or one of its points dragged to another corner or tile of the grid. Where things stand is the solver's frame (region/build.ts): corner [i, j] at x = (i − w / 2) · 64, z = (j − h / 2) · 64, i growing westward from the south-east corner; tile [i, j] between corners [i, j] and [i + 1, j + 1]. A selection names an element by its list and index; regionSelectionOfPath finds the one an issue is about, regionLayers lists them all.