Holds mazes and provides search functions.
More...
#include <lab.h>
|
| lab (const lab &other) |
|
lab & | operator= (const lab &other) |
|
| lab (lab &&other) noexcept=default |
|
lab & | operator= (lab &&other) noexcept=default |
|
std::optional< std::tuple< int, int, int, int > > | find (int p, int q) const noexcept |
|
std::optional< std::tuple< int, int, int, int > > | find (int p, int q, int r) const noexcept |
|
void | insert (int x, int y, int z, int w) noexcept |
|
bool | empty () const noexcept |
|
int | get_levels () const noexcept |
|
void | set_levels (int levels) noexcept |
|
int | get_random_block_id () const noexcept |
|
|
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.
|
|
Holds mazes and provides search functions.
Provides fast lookups of maze data
◆ link()
static void mazes::lab::link |
( |
const std::shared_ptr< cell > & | c1, |
|
|
const std::shared_ptr< cell > & | c2, |
|
|
bool | bidi = true ) |
|
staticnoexcept |
Links two cell objects, optionally in both directions.
- Parameters
-
c1 | A shared pointer to the first cell object. |
c2 | A shared pointer to the second cell object. |
bidi | A boolean flag indicating if the link should be bidirectional. Defaults to true. |
◆ unlink()
static void mazes::lab::unlink |
( |
const std::shared_ptr< cell > & | c1, |
|
|
const std::shared_ptr< cell > & | c2, |
|
|
bool | bidi = true ) |
|
staticnoexcept |
Unlinks two cell objects, optionally in both directions.
- Parameters
-
c1 | A shared pointer to the first cell object. |
c2 | A shared pointer to the second cell object. |
bidi | A boolean flag indicating if the unlink should be bidirectional. Defaults to true. |
The documentation for this class was generated from the following file: