Fixed an error in the calculation of a hex's centre point's altitude
Hex fill colours are now scaled by altitude, giving a region's low ground a darker shade
Added function to determine which neighbour a hex's water would drain to
Implemented a visualisation for draining neighbours, using red arrows to show water flow and green squares for 'sinks', where water cannot drain anywhere else
Created drawUtils module which currently just has a function for drawing arrows
Added regions module with region objects that holds a grouping of contiguous hexes
Used regions to compute each hex's distance from the border of its region (i.e. coastline for land regions)
Wrote function to seed point altitudes based on hex's distance from coast (should really use point distance from coast..)
Added random jitter to distance-from-coast altitudes to make drainage routes more complicated
Tweaked distance-from-coast altitude randomness, more often increasing altitudes than decreasing, which gives a more natural look to drainage with less local minima
Added third test mask image, with larger terrain areas and small islands
Moved drawing of sinks to a square drawing function in drawUtils
Removed edge class and associated usage. It was slow, and edges are better implicitly defined by vertices through a list of their neighbours.
Fixed point's lack of neighbours
Wrote a new drainage function which drains between vertices - both those on perimeters and in centres of hexagons. Greatly improved visual results.
Changed altitude randomness to use triangular distribution
Wrote another drainage function for hexagons which drains along vertices only
Added a function to Vertex class that checks surrounding hexes and returns true if one is tagged as water
Vertices now also store the neighbour vertex they drain to, and the vertices they themselves drain, though this is currently only used in the most recent drainage function
Created region function for determining vertices that border region (not in order)
Added function for calculating, for each point in region, the border point that is closest, therefore giving distance to border for every point
Added altitude-setting function that relies on point distances to border rather than number of hex steps required to reach border
Added small vertex function for returning euclidean distance to another provided vertex
Bug: vertex distances to border seem broken
drawFilledHex now uses parameter color in preference to self.fillColor to aid diagnostic drawing
Fixed problems with distance to coast calculations; point altitudes based on vertex distances from coastline now works correctly
Individual islands are now created as regions of land hexes
Modified hex-draining drainage function so that if multiple hexes are equally enticing drainage choices, one is randomly chosen rather than taking only the first
Supplied second drainage function with same capability to randomly select a point if multiple are suitable (i.e. when altitudes are identical)
Supplied same random choice of equal neighbours functionality to third drainage function
Moved altitude-setting functions into a new module called terrain
Removed unused createHexMap function
Shifted island region creation so that contents of islands list are regions instead of hexMaps
Added function to region module for calculating an ordered sequence of points that describe the region boundary.
Added drawing of region boundaries
Added some inefficient functions for hexagons that return the hex's index for a given point, or its successor point in the hex