|
Maze Builder Docs 8.10.23
|
State for creating a maze using the sidewinder algorithm. More...
#include <sw_maze_create_state.h>
Public Member Functions | |
| sw_maze_create_state (const runtime_app::context &ctx, runtime_stack *rs) | |
| Construct a new sidewinder maze creation state. | |
| std::any | create (const args &a, randomizer &rng) noexcept override |
| Create a maze using the sidewinder algorithm. | |
| Public Member Functions inherited from mazes::link_maze_and_create_state | |
| link_maze_and_create_state (const runtime_app::context &ctx, runtime_stack *stack) | |
| Construct a new link maze and create state. | |
| bool | update (randomizer &rng, double delta_time) noexcept override final |
| Update the state with the given arguments and delta time Common logic for parsing arguments, setting up configuration, and handling output. | |
| void | draw () const noexcept override |
| Public Member Functions inherited from mazes::create_contract | |
| template<typename T> | |
| std::optional< T > | create_as (const args &a, randomizer &rng) noexcept |
| Calls create and extracts the result as T. | |
| Public Member Functions inherited from mazes::state | |
| state (const runtime_app::context &c, runtime_stack *rs) | |
Additional Inherited Members | |
| Public Types inherited from mazes::state | |
| enum class | ID : unsigned int { EMPTY = 0 , LINK_WITH_BINARY_TREE = 1 , LINK_WITH_DFS = 2 , LINK_WITH_SIDEWINDER = 3 , LINK_WITH_PRIMS = 4 , LOAD = 5 , PARSE = 6 , WRITE_TO_IMAGE = 7 , WRITE_TO_STRING = 8 , WRITE_TO_WF_OBJ = 9 , LINK_WITH_MASKED = 10 , TOTAL = 11 } |
| Protected Member Functions inherited from mazes::link_maze_and_create_state | |
| std::string | run_link_algorithm (const std::function< bool(grid_operations &)> &link_algorithm) noexcept |
| Runs a linking algorithm on the current grid, then calculates distances if requested. | |
| Protected Member Functions inherited from mazes::state | |
| void | request_stack_push (ID state_id) const noexcept |
| void | request_stack_pop () const noexcept |
| void | request_stack_clear () const noexcept |
| const runtime_app::context & | get_context () const noexcept |
| runtime_stack & | get_stack () const noexcept |
| Protected Attributes inherited from mazes::link_maze_and_create_state | |
| args_manager * | args_mapper |
| grid_manager * | grid_mapper |
| processed_text_manager * | processed_text_mapper |
| grid_identifier | current_grid_id |
| bool | m_use_distances |
| int | m_distances_start |
| int | m_distances_end |
| std::string | m_result |
State for creating a maze using the sidewinder algorithm.
|
explicit |
Construct a new sidewinder maze creation state.
| ctx | The runtime context |
| rs | The runtime stack to allow pushing/popping states |
|
overridevirtualnoexcept |
Create a maze using the sidewinder algorithm.
| config | The maze configuration |
| rng | The randomizer for the algorithm |
Implements mazes::link_maze_and_create_state.