public void onEnemyShown(Unit unit)
 {
     State.onEnemyShown(unit);
     AIState.onEnemyShown(unit);
     var type = unit.getType();
     bwapi.Broodwar.printf(String.Format("Enemy spotted: {0}", type.getName()));            
 }
 public void onUnitShow(Unit unit)
 {
     if (unit.getPlayer().isEnemy(bwapi.Broodwar.self()))
     {
         DecisionMaker.onEnemyShown(unit);                
     }
     if (unit.getType().getName() == "Resource Mineral Field")
     {
         DecisionMaker.onfoundMinerals(new BW.Unit(unit));
     }
     if (DecisionMaker.AIState.ToString() != "PreInitialize")
     {
         // PrintMessage("Unit Shown: [" + unit.getType().getName() + "] at [" + unit.getPosition().xConst() + "," + unit.getPosition().yConst() + "]");
     }
 }
 public void onUnitComplete(Unit unit)
 {
     if (unit.getPlayer() == bwapi.Broodwar.self())
     {
         if (DecisionMaker.AIState.ToString() != "PreInitialize")
         {
             // PrintMessage("Unit Completed: [" + unit.getType().getName() + "] at [" + unit.getPosition().xConst() + "," + unit.getPosition().yConst() + "]");
         }
         DecisionMaker.onMyUnitCompleted(unit);
     }
     var actual_type = unit.getType();
     // Console.WriteLine(actual_type.getName());
 }