Maze Builder Docs 8.10.23
Loading...
Searching...
No Matches
pixels_create_state.h
Go to the documentation of this file.
1#ifndef PIXELS_CREATE_STATE_H
2#define PIXELS_CREATE_STATE_H
3
6
7#include <optional>
8#include <string>
9#include <string_view>
10
13namespace mazes
14{
15 class configurator;
16 class randomizer;
17 class runtime_stack;
18
21 {
22 public:
27
32 [[nodiscard]] std::any create(const args &a, randomizer &rng) noexcept override;
33
34 protected:
36 [[nodiscard]] bool write_output(const std::string &output_target, const std::string &output_content) noexcept override;
37
38 private:
39 int m_image_width{0};
40 int m_image_height{0};
41 std::optional<unsigned long long> m_palette_seed;
42 };
43} // namespace mazes
44
45#endif // PIXELS_CREATE_STATE_H
Command-line argument handler with JSON support.
Definition args.h:19
Configuration class for arguments.
Definition configurator.h:21
Contract for the create function in the runtime.
Definition create_contract.h:21
bool write_output(const std::string &output_target, const std::string &output_content) noexcept override
Write pixel data to image file in appropriate format.
std::any create(const args &a, randomizer &rng) noexcept override
Creates a maze using the specified algorithm and parameters.
pixels_create_state(const runtime_app::context &ctx, mazes::runtime_stack *stack)
Construct a new pixels maze creation state.
Provides random-number generating capabilities.
Definition randomizer.h:16
Class representing the runtime stack of states in the maze builder application.
Definition runtime_stack.h:25
write_to_output_state(const runtime_app::context &ctx, runtime_stack *stack)
Construct a new write to output state.
struct representing the context passed to states in the runtime_app stack
Definition runtime_app.h:34