public void Think(IPlayerApi api)
 {
     if (!api.GetEnemySighted())
     {
         if ((api.GetHealth() < 100) && (api.GetNumberofVisibleMedkits() > 0))
         {
             api.GetNearestMedkit();
         }
         else
         {
             if ((api.GetAmmo() < 3) && (api.GetNumberOfVisibleBazookas() > 0))
             {
                 api.GetNearestBazooka();
             }
             else
             {
                 api.MoveToRandomLocation();
             }
         }
     }
     else
     {
         if ((api.GetHealth() < 40) && (api.GetNumberofVisibleMedkits() > 0))
         {
             api.GetNearestMedkit();
         }
         else
         {
             if (api.GetAmmo() == 0)
             {
                 api.Stop();
                 api.ShootBullet(api.GetEnemyPosition());
             }
             else
             {
                 api.Stop();
                 api.ShootRocket(api.GetEnemyPosition());
             }
         }
     }
 }
 private static void Shoot(IPlayerApi api)
 {
     if (api.GetAmmo() == 0)
     {
         api.Stop();
         api.ShootBullet(AimPistol(api));
     }
     else
     {
         api.Stop();
         api.ShootRocket(AimRocket(api));
     }
 }
 private static void Shoot(IPlayerApi api)
 {
     if (api.GetAmmo() == 0)
     {
         api.Stop();
         api.ShootBullet(AimPistol(api));
     }
     else
     {
         api.Stop();
         api.ShootRocket(AimRocket(api));
     }
 }
 private static void RunForItem(IPlayerApi api)
 {
     if ((api.GetHealth() < 100) && (api.GetNumberofVisibleMedkits() > 0))
     {
         api.GetNearestMedkit();
     }
     else
     {
         if ((api.GetAmmo() < 3) && (api.GetNumberOfVisibleBazookas() > 0))
         {
             api.GetNearestBazooka();
         }
         else
         {
             api.MoveToRandomLocation();
         }
     }
 }
 private static void RunForItem(IPlayerApi api)
 {
     if ((api.GetHealth() < 100) && (api.GetNumberofVisibleMedkits() > 0))
     {
         api.GetNearestMedkit();
     }
     else
     {
         if ((api.GetAmmo() < 3) && (api.GetNumberOfVisibleBazookas() > 0))
         {
             api.GetNearestBazooka();
         }
         else
         {
             api.MoveToRandomLocation();
         }
     }
 }