kora-bot/Source/QueueEntry.cpp

48 lines
1,019 B
C++
Raw Normal View History

2023-04-10 23:31:02 +00:00
#include "QueueEntry.h"
QueueEntry::QueueEntry()
{
}
QueueEntry::QueueEntry(BWAPI::TechType tech, bool inProgress, float score)
{
this->tech = tech;
this->unit = UnitTypes::Unknown;
this->upgrade = UpgradeTypes::Unknown;
this->inProgress = inProgress;
this->score = score;
}
QueueEntry::QueueEntry(BWAPI::UnitType unit, bool inProgress, float score)
{
this->tech = TechTypes::Unknown;
this->unit = unit;
this->upgrade = UpgradeTypes::Unknown;
this->inProgress = inProgress;
this->score = score;
}
QueueEntry::QueueEntry(BWAPI::UpgradeType upgrade, bool inProgress, float score)
{
this->tech = TechTypes::Unknown;
this->unit = UnitTypes::Unknown;
this->upgrade = upgrade;
this->inProgress = inProgress;
this->score = score;
}
bool QueueEntry::isTech()
{
return this->tech != TechTypes::Unknown;
}
bool QueueEntry::isUnit()
{
return this->unit != UnitTypes::Unknown;
}
bool QueueEntry::isUpgrade()
{
return this->upgrade != UpgradeTypes::Unknown;
}