Example #1
0
 public void DisplayBestMoves()
 {
     if (gridEvaluator == null)
     {
         gridEvaluator = new GridEvaluator(grid);
     }
     gridEvaluator.DisplayTopTenPositions();
 }
Example #2
0
 // 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());
 }
Example #3
0
 internal override void Reset()
 {
     gridEvaluator = new GridEvaluator(gridMaker.GetComponent <GridMaker>().GetGrid());
 }