-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbotbase.hpp
24 lines (22 loc) · 977 Bytes
/
botbase.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
//======================================================================================
//Header for a bot base class. All bot classes should inherit from this, and define
//their own implementation of ChooseNextGridPosition
//
//(c) Patrick Dickinson, University of Lincoln, School of Computer Science, 2020
//======================================================================================
#include "dynamic.hpp"
class cBotBase : public cDynamic
{
public:
virtual void Update(int ms)
{
cDynamic::Update(ms);
if (!isMoving()) ChooseNextGridPosition();
}
//======================================================================================
//ChooseNextGridPosition is a pure virtual function: there is no default implementation
//and inheriting classes should provide their own version of this function.
//======================================================================================
virtual void ChooseNextGridPosition() = 0;
};