Maze Builder Docs 8.10.23
Loading...
Searching...
No Matches
mazes::state Struct Referenceabstract

struct representing a state in the runtime stack More...

#include <state.h>

Inheritance diagram for mazes::state:
[legend]

Public Types

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
}

Public Member Functions

 state (const runtime_app::context &c, runtime_stack *rs)
virtual void draw () const noexcept=0
virtual bool update (randomizer &rng, double delta_time) noexcept=0
 Update the state with the elapsed time.

Protected Member Functions

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

Detailed Description

struct representing a state in the runtime stack

Member Function Documentation

◆ update()

virtual bool mazes::state::update ( randomizer & rng,
double delta_time )
nodiscardpure virtualnoexcept

Update the state with the elapsed time.

Parameters
delta_timeThe elapsed time since the last update
Returns
True if the state should continue updating, false otherwise

Implemented in mazes::link_maze_and_create_state, mazes::loading_state, mazes::parsing_state, and mazes::write_to_output_state.


The documentation for this struct was generated from the following file: