diff --git a/src/llaniewski/SuperBot.cpp b/src/llaniewski/SuperBot.cpp new file mode 100644 index 0000000..b12b701 --- /dev/null +++ b/src/llaniewski/SuperBot.cpp @@ -0,0 +1,29 @@ +#include "SuperBot.h" +#include + +namespace llaniewski { + +std::string SuperBot::id = "llaniewski"; + +SuperBot::SuperBot(void) +{ + +} + +void SuperBot::Play(double time, TankControl* control) { + double left, right, turn=0, lift=0; + left = 25*sin(time); + right = 25; + control->ShootCannon(); + control->ShootGun(); + control->SetEngines(left, right, turn, lift); +} + +SuperBot::~SuperBot(void) +{ + +} + +} // end of namespace + +template class PlayerFactory::Register < llaniewski::SuperBot >; diff --git a/src/llaniewski/SuperBot.h b/src/llaniewski/SuperBot.h new file mode 100644 index 0000000..50ccf6f --- /dev/null +++ b/src/llaniewski/SuperBot.h @@ -0,0 +1,15 @@ +#pragma once +#include "../Player.h" +#include + +namespace llaniewski { + +class SuperBot : public Player { +public: + static std::string id; + SuperBot(); + virtual void Play(double, TankControl *); + virtual ~SuperBot(); +}; + +} \ No newline at end of file