This commit is contained in:
2023-10-06 03:11:55 -05:00
parent fb666f1d92
commit ce204d0f8f
9 changed files with 250 additions and 27 deletions

View File

@@ -1,5 +1,6 @@
#ifndef H_DRONE
#define H_DRONE
#include "group.h"
class Drone {
public:
@@ -10,6 +11,17 @@ public:
Drone(char* &_name) : name{ _name } { };
bool operator != (Drone &d) { return strcmp(this->name, d.name) != 0; };
Drone operator = (Drone *d) { return *d; };
void setGroup(Group* newGroup) {
activeGroup = newGroup;
}
Group* getCurrentGroup() {
return activeGroup;
}
bool inGroup() {
return activeGroup != nullptr;
}
private:
Group* activeGroup;
};
#endif