public void DisplayBestMoves() { if (gridEvaluator == null) { gridEvaluator = new GridEvaluator(grid); } gridEvaluator.DisplayTopTenPositions(); }
// This initializes the Bot. // Finds the spawner, player and grid. Also creates the // evaluators public override void Init() { spawner = GameObject.FindObjectOfType <Spawner>(); player = GetComponentInParent <PlayerController>(); if (!enemy) { PlayerController[] allplayer = FindObjectsOfType <PlayerController>(); foreach (PlayerController pl in allplayer) { if (!pl.Equals(player)) { enemy = pl; } } } gridEvaluator = new GridEvaluator(gridMaker.GetComponent <GridMaker>().GetGrid()); towerEvaluator = new TowerEvaluator(); towerEvaluator.SetTowerList(GetTowerStructureList()); actionEvaluator = new ActionEvaluator(); enemyEvaluator = new EnemyEvaluator(GetEnemyStructureList()); }
internal override void Reset() { gridEvaluator = new GridEvaluator(gridMaker.GetComponent <GridMaker>().GetGrid()); }