From 3a966800a930973d3792fef5563f6a187c9f0c2e Mon Sep 17 00:00:00 2001 From: Lukasz Laniewski-Wollk Date: Mon, 8 Oct 2018 19:30:45 +0200 Subject: [PATCH] Adding my bot --- src/llaniewski/SuperBot.cpp | 29 +++++++++++++++++++++++++++++ src/llaniewski/SuperBot.h | 15 +++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src/llaniewski/SuperBot.cpp create mode 100644 src/llaniewski/SuperBot.h 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