Maze Builder Docs 6.0.1
Loading...
Searching...
No Matches
lab.h
Go to the documentation of this file.
1#ifndef LAB_H
2#define LAB_H
3
4#include <optional>
5#include <utility>
6#include <tuple>
7#include <unordered_map>
8
10
12namespace mazes {
13
14class maze;
15
17
21class lab {
22public:
23 explicit lab();
24
25 // Destructor
26 ~lab();
27
28 // Copy constructor
29 lab(const lab& other);
30
31 // Copy assignment operator
32 lab& operator=(const lab& other);
33
34 // Move constructor
35 lab(lab&& other) noexcept = default;
36
37 // Move assignment operator
38 lab& operator=(lab&& other) noexcept = default;
39
40 std::optional<std::tuple<int, int, int, int>> find(int p, int q) const noexcept;
41 std::optional<std::tuple<int, int, int, int>> find(int p, int q, int r) const noexcept;
42
43 void insert(int x, int y, int z, int w) noexcept;
44
45 bool empty() const noexcept;
46
47 int get_levels() const noexcept;
48 void set_levels(int levels) noexcept;
49
50 int get_random_block_id() const noexcept;
51private:
52
53 using pqmap = std::unordered_map<std::pair<int, int>, std::tuple<int, int, int, int>, pair_hash>;
54 pqmap m_p_q;
55
56 int levels;
57};
58}
59
60#endif // LAB_H
Holds mazes and provides search functions.
Definition lab.h:21
Namespace for the maze builder.
Definition algo_interface.h:9
Hashing function to store a block's (x, z) position.
Definition hash_funcs.h:29