| 270 | } |
| 271 | |
| 272 | void ExampleAIModule::onUnitMorph(BWAPI::Unit unit) |
| 273 | { |
| 274 | if ( Broodwar->isReplay() ) |
| 275 | { |
| 276 | // if we are in a replay, then we will print out the build order of the structures |
| 277 | if ( unit->getType().isBuilding() && !unit->getPlayer()->isNeutral() ) |
| 278 | { |
| 279 | int seconds = Broodwar->getFrameCount()/24; |
| 280 | int minutes = seconds/60; |
| 281 | seconds %= 60; |
| 282 | Broodwar->sendText("%.2d:%.2d: %s morphs a %s", minutes, seconds, unit->getPlayer()->getName().c_str(), unit->getType().c_str()); |
| 283 | } |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | void ExampleAIModule::onUnitRenegade(BWAPI::Unit unit) |
| 288 | { |
nothing calls this directly
no test coverage detected