public HeroMove StartMiniMax() { List <SimulationHero> simulationHeroesQueue = new List <SimulationHero>(); foreach (HeroController hero in heroesQueue) { UnitSide heroSide = hero.gameObject.layer == GridManager.ENEMY_UNITS_LAYER ? UnitSide.MAX_UNIT : UnitSide.MIN_UNIT; SimulationHero simulationHero = new SimulationHero(hero.CurrentNode, heroSide, hero.GetInstanceID(), hero.StepsCount); simulationHeroesQueue.Add(simulationHero); } WorldGridState gridState = new WorldGridState(simulationHeroesQueue, WorldSimulationManager.instance.MoveCount, WorldSimulationManager.instance.MoveCount); PerformMiniMax(gridState, depthSearch, -1000000, 1000000); return(bestHeroMove); }
public HeroMoveInfo(SimulationHero hero, HeroMove heroMove, float distance) { this.hero = hero; this.heroMove = heroMove; this.distance = distance; }