7#include <unordered_map>
33 lab& operator=(
const lab& other);
36 lab(
lab&& other)
noexcept =
default;
39 lab& operator=(
lab&& other)
noexcept =
default;
41 std::optional<std::tuple<int, int, int, int>> find(
int p,
int q)
const noexcept;
42 std::optional<std::tuple<int, int, int, int>> find(
int p,
int q,
int r)
const noexcept;
44 void insert(
int x,
int y,
int z,
int w)
noexcept;
46 bool empty()
const noexcept;
48 int get_levels()
const noexcept;
49 void set_levels(
int levels)
noexcept;
51 int get_random_block_id()
const noexcept;
57 static void link(
const std::shared_ptr<cell>& c1,
const std::shared_ptr<cell>& c2,
bool bidi =
true) noexcept;
63 static
void unlink(const std::shared_ptr<
cell>& c1, const std::shared_ptr<
cell>& c2,
bool bidi = true) noexcept;
66 using pqmap = std::unordered_map<std::pair<
int,
int>, std::tuple<
int,
int,
int,
int>,
pair_hash>;
Cell class for maze generation - only stores its index and links to other cells.
Definition cell.h:17
Holds mazes and provides search functions.
Definition lab.h:22
static void link(const std::shared_ptr< cell > &c1, const std::shared_ptr< cell > &c2, bool bidi=true) noexcept
Links two cell objects, optionally in both directions.
static void unlink(const std::shared_ptr< cell > &c1, const std::shared_ptr< cell > &c2, bool bidi=true) noexcept
Unlinks two cell objects, optionally in both directions.
Namespace for the maze builder.
Definition algo_interface.h:9
Hashing function to store a block's (x, z) position.
Definition hash_funcs.h:30