]> git.localhorst.tv Git - blank.git/blob - src/ai/RandomWalk.hpp
4d00f0bbdc53276b06df664fb87d23d6c1856ac0
[blank.git] / src / ai / RandomWalk.hpp
1 #ifndef BLANK_AI_RANDOMWALK_HPP_
2 #define BLANK_AI_RANDOMWALK_HPP_
3
4 #include "Controller.hpp"
5
6 #include "../rand/GaloisLFSR.hpp"
7
8
9 namespace blank {
10
11 /// Randomly start or stop moving in axis directions every now and then.
12 class RandomWalk
13 : public Controller {
14
15 public:
16         RandomWalk(Entity &, std::uint64_t seed) noexcept;
17         ~RandomWalk();
18
19         void Update(int dt) override;
20
21 private:
22         GaloisLFSR random;
23         int time_left;
24
25 };
26
27 }
28
29 #endif