Maze Builder Docs 6.0.1
Loading...
Searching...
No Matches
colored_grid.h
Go to the documentation of this file.
1#ifndef COLORED_GRID_H
2#define COLORED_GRID_H
3
4#include <memory>
5#include <cstdint>
6#include <vector>
7#include <optional>
8
10
11namespace mazes {
12
13class cell;
14
19
20public:
21
22 friend class binary_tree;
23 friend class dfs;
24 friend class sidewinder;
25
30 explicit colored_grid(unsigned int width = 1u, unsigned int length = 1u, unsigned int levels = 1u);
31
35 virtual std::optional<std::string> contents_of(const std::shared_ptr<cell>& c) const noexcept override;
36
40 virtual std::optional<std::uint32_t> background_color_for(const std::shared_ptr<cell>& c) const noexcept override;
41
42private:
43};
44
45}
46#endif // COLORED_GRID_H
Binary tree algorithm for generating mazes.
Definition binary_tree.h:18
Extension of the grid class to include color information.
Definition colored_grid.h:18
virtual std::optional< std::uint32_t > background_color_for(const std::shared_ptr< cell > &c) const noexcept override
Retrieves the background color for a given cell, if available.
virtual std::optional< std::string > contents_of(const std::shared_ptr< cell > &c) const noexcept override
Retrieves the contents of a given cell, if available.
colored_grid(unsigned int width=1u, unsigned int length=1u, unsigned int levels=1u)
Constructs a colored grid with specified dimensions.
Depth-first search algorithm for generating mazes.
Definition dfs.h:19
A grid that can calculate distances between cells.
Definition distance_grid.h:19
Sidewinder algorithm for generating mazes.
Definition sidewinder.h:17
Namespace for the maze builder.
Definition algo_interface.h:9