BryanSWeber / CUNYAIModule

CUNYBot, an AI that plays complete games of Starcraft.
MIT License
6 stars 3 forks source link

Use bullets to count units inside bunkers. #159

Open BryanSWeber opened 5 years ago

BryanSWeber commented 5 years ago

void drawBullets() { for (auto &b : Broodwar->getBullets()) { Position p = b->getPosition(); double velocityX = b->getVelocityX(); double velocityY = b->getVelocityY(); Broodwar->drawLineMap(p, p + Position((int)velocityX, (int)velocityY), b->getPlayer() == Broodwar->self() ? Colors::Green : Colors::Red); Broodwar->drawTextMap(p, "%c%s", b->getPlayer() == Broodwar->self() ? Text::Green : Text::Red, b->getType().c_str()); }