The new game menu now prepares and passes a New_Game_Data struct on clicking "Start".
The World class is instantiated here, and generates a set of tiles. Tiles are currently sf::ConvexShape cells, but a mode will certainly be added for regular square tiles. The cells were added to test the final addition, which is...
Voronoi diagrams. The Voronoi::Diagram class accepts a target point count, minimum position, and maximum position. The target is not reached if there is not enough space for the points. Spacing will be more flexible later - tighter spacing is a goal, but generation fails under those circumstances. Public functions are provided for returning the cells and the sites. (the latter is currently in RectangleShape form - later it will just be positions!)
also:
added Game_Settings, with a database interface and a menu state
The new game menu now prepares and passes a New_Game_Data struct on clicking "Start".
The World class is instantiated here, and generates a set of tiles. Tiles are currently sf::ConvexShape cells, but a mode will certainly be added for regular square tiles. The cells were added to test the final addition, which is...
Voronoi diagrams. The Voronoi::Diagram class accepts a target point count, minimum position, and maximum position. The target is not reached if there is not enough space for the points. Spacing will be more flexible later - tighter spacing is a goal, but generation fails under those circumstances. Public functions are provided for returning the cells and the sites. (the latter is currently in RectangleShape form - later it will just be positions!)
also: