use of ecgberht.Agents.Vulture in project Ecgberht by Jabbo16.
the class GameState method printer.
public void printer() {
Integer counter = 0;
for (BaseLocation b : BLs) {
game.drawTextMap(b.getPosition(), counter.toString());
counter++;
}
int apm = game.getAPM(false);
if (apm > 9000 && !firstAPM) {
game.sendText("My APM is over 9000!");
firstAPM = true;
}
for (Vulture vulture : agents) {
game.drawTextMap(vulture.unit.getPosition(), vulture.statusToString());
}
game.drawTextScreen(10, 65, Utils.formatText("MGPF: ", Utils.White) + Utils.formatText(String.valueOf(getMineralRate()), Utils.White));
game.drawTextScreen(10, 80, Utils.formatText("Strategy: ", Utils.White) + Utils.formatText(strat.name, Utils.White));
game.drawTextScreen(10, 50, Utils.formatText("APM: ", Utils.White) + Utils.formatText(String.valueOf(apm), Utils.White));
if (closestChoke != null) {
game.drawTextMap(closestChoke.getCenter(), "Choke");
}
if (chosenBuilderBL != null) {
game.drawTextMap(chosenBuilderBL.getPosition(), "BuilderBL");
print(chosenBuilderBL, Color.Blue);
}
if (chosenHarasser != null) {
game.drawTextMap(chosenHarasser.getPosition(), "Harasser");
print(chosenHarasser, Color.Blue);
}
if (chosenBaseLocation != null) {
print(chosenBaseLocation, UnitType.Terran_Command_Center, Color.Cyan);
}
for (Pair<Unit, Pair<UnitType, TilePosition>> u : workerBuild) {
game.drawTextMap(u.first.getPosition(), "ChosenBuilder");
print(u.second.second, u.second.first, Color.Teal);
}
if (chosenUnitToHarass != null) {
print(chosenUnitToHarass, Color.Red);
game.drawTextMap(chosenUnitToHarass.getPosition(), "UnitToHarass");
}
for (Pair<Unit, Unit> r : repairerTask) {
print(r.first, Color.Yellow);
game.drawTextMap(r.first.getPosition(), "Repairer");
}
game.drawTextScreen(10, 5, Utils.formatText(self.getName(), Utils.Green) + Utils.formatText(" vs ", Utils.Yellow) + Utils.formatText(game.enemy().getName(), Utils.Red));
if (chosenScout != null) {
game.drawTextMap(chosenScout.getPosition(), "Scouter");
print(chosenScout, Color.Purple);
game.drawTextScreen(10, 20, Utils.formatText("Scouting: ", Utils.White) + Utils.formatText("True", Utils.Green));
} else {
game.drawTextScreen(10, 20, Utils.formatText("Scouting: ", Utils.White) + Utils.formatText("False", Utils.Red));
}
if (enemyBase != null) {
game.drawTextScreen(10, 35, Utils.formatText("Enemy Base Found: ", Utils.White) + Utils.formatText("True", Utils.Green));
} else {
game.drawTextScreen(10, 35, Utils.formatText("Enemy Base Found: ", Utils.White) + Utils.formatText("False", Utils.Red));
}
// }
if (chosenRepairer != null) {
game.drawTextMap(chosenRepairer.getPosition(), "ChosenRepairer");
}
// if(enemyCombatUnitMemory.size()>0) {
// for(Unit u : enemyCombatUnitMemory) {
// game.drawTextMap(u.getPosition(), u.getType().toString());
// print(u,Color.Red);
// }
// }
List<Region> regions = BWTA.getRegions();
for (Region reg : regions) {
List<Chokepoint> ch = reg.getChokepoints();
for (Chokepoint c : ch) {
Pair<Position, Position> lados = c.getSides();
game.drawLineMap(lados.first, lados.second, Color.Green);
}
}
for (Unit u : CCs.values()) {
print(u, Color.Yellow);
game.drawCircleMap(u.getPosition(), 500, Color.Orange);
}
for (Unit u : DBs.keySet()) {
game.drawCircleMap(u.getPosition(), 300, Color.Orange);
}
for (Unit u : workerIdle) {
print(u, Color.Green);
}
for (Unit u : workerDefenders) {
print(u, Color.Purple);
game.drawTextMap(u.getPosition(), "Spartan");
}
for (Entry<String, Squad> s : squads.entrySet()) {
Position centro = getSquadCenter(s.getValue());
game.drawCircleMap(centro, 80, Color.Green);
game.drawTextMap(centro, s.getKey());
}
if (enemyRace == Race.Zerg && EI.naughty) {
game.drawTextScreen(10, 95, Utils.formatText("Naughty Zerg: ", Utils.White) + Utils.formatText("yes", Utils.Green));
}
for (Unit m : mineralsAssigned.keySet()) {
print(m, Color.Cyan);
game.drawTextMap(m.getPosition(), mineralsAssigned.get(m).toString());
}
}