X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fai%2FRandomWalk.hpp;h=a25d4db502bedf56ca98affa5997ff89646185cf;hb=c52405fad9c070e1370f852234c6eb723b52916c;hp=41319dd53ae3d6d696c053791fb59de5d1856d9f;hpb=376fc1fca87fcdd22dabadf6d01d245ef8c3cedd;p=blank.git diff --git a/src/ai/RandomWalk.hpp b/src/ai/RandomWalk.hpp index 41319dd..a25d4db 100644 --- a/src/ai/RandomWalk.hpp +++ b/src/ai/RandomWalk.hpp @@ -1,27 +1,22 @@ -#ifndef BLANK_APP_RANDOMWALK_HPP_ -#define BLANK_APP_RANDOMWALK_HPP_ +#ifndef BLANK_AI_RANDOMWALK_HPP_ +#define BLANK_AI_RANDOMWALK_HPP_ -#include +#include "Controller.hpp" namespace blank { -class Entity; - /// Randomly start or stop moving in axis directions every now and then. -class RandomWalk { +class RandomWalk +: public Controller { public: explicit RandomWalk(Entity &) noexcept; + ~RandomWalk(); - Entity &Controlled() noexcept { return entity; } - const Entity &Controlled() const noexcept { return entity; } - - void Update(int dt) noexcept; + void Update(int dt) override; private: - Entity &entity; - int time_left; };