Added structure handling in engine as well.
This commit is contained in:
@@ -3,17 +3,21 @@
|
||||
|
||||
#include <Screeps/StructureSpawn.hpp>
|
||||
|
||||
#include "Structures/Structure.hpp"
|
||||
|
||||
namespace DouwcoHivemind
|
||||
{
|
||||
class Spawn
|
||||
class Spawn : public Structure
|
||||
{
|
||||
private:
|
||||
Screeps::StructureSpawn *structure;
|
||||
Screeps::StructureSpawn spawn;
|
||||
|
||||
public:
|
||||
Spawn(Screeps::StructureSpawn *structure_pntr) { structure = structure_pntr; }
|
||||
Spawn(Screeps::StructureSpawn spwn) : spawn(spwn),
|
||||
Structure() {}
|
||||
~Spawn() {}
|
||||
void process();
|
||||
|
||||
void loop() override;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef DOUWCO_HIVEMIND_STRUCTURE_HPP
|
||||
#define DOUWCO_HIVEMIND_STRUCTURE_HPP
|
||||
|
||||
#include <Screeps/Structure.hpp>
|
||||
|
||||
namespace DouwcoHivemind
|
||||
{
|
||||
class Structure
|
||||
{
|
||||
public:
|
||||
virtual void loop(){}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // DOUWCO_HIVEMIND_STRUCTURE_HPP
|
||||
Reference in New Issue
Block a user