ICT290 / src / scene / AIController / EntityBrain / DecisionRegulator.h
DecisionRegulator.h
Raw
//
// Created by Micha on 29/09/2021.
//

#pragma once

#include <SDL.h>
#include <random>

class DecisionRegulator {
   public:
    explicit DecisionRegulator(float NumUpdatesPerSecondRqd);

    // returns true if the current time exceeds m_dwNextUpdateTime
    bool isReady();

   private:
    // the time period between updates
    float m_UpdatePeriod;

    // the next time the regulator allows code flow
    Uint32 m_NextUpdateTime;
};

// ICT290_DECISIONREGULATOR_H