-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-architectured
map.hpp
introducing a builder pattern to allow eas…
…y construction of a dungeon using the `MapGenerator` class. This re-architect also introduced a bunch of other refactors massively simplifying various parts of the codebase and extracting out common functionality. Removed `Neighbour` and replaced it with `Connection` (a renamed version of `Edge`) allowing `Connection` to work for `map.hpp` and `dijkstra.hpp`. This also simplified the backtracking as we didn't have to find the source. Added `Grid::convert_position(int)` allowing the conversion of a 1D index into a 2D `Position`. Changed `Leaf::create_room()` so that `rooms` is now the center `Rect` position by default instead of the whole `Rect` object. Stopped `pathfind()` throwing an error as this caused a crash with `std::transform` if the grid is empty. Removed `LevelConstants::level`.
- Loading branch information
1 parent
c51862f
commit bec006a
Showing
13 changed files
with
646 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.