Pārlūkot izejas kodu

refactor: add ability to inject random tape

Sam Jaffe 2 gadi atpakaļ
vecāks
revīzija
27b755ca9a
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      include/engine/universe.h

+ 5 - 0
include/engine/universe.h

@@ -11,6 +11,7 @@
 #include <string>
 
 #include <engine/forwards.h>
+#include <random/random.h>
 
 namespace engine {
 class Universe {
@@ -47,6 +48,10 @@ protected:
   template <typename T>
   void load(std::string const & name, std::string const & fallback = "");
 
+  [[nodiscard]] auto record(std::shared_ptr<random::Tape> tape) const {
+    return random_->record(tape);
+  }
+
   /**
    * @deprecated This exists solely for the purpose of needing to initialize
    * the singleton.