Exemplo n.º 1
0
        public AIRoot(MatchAdapter Match, Army Army)
        {
            this.Match = Match;
            this.Army  = Army;

            UnitAssignments = new UnitAssigner(this);
            TileEvaluations = new TileEvaluator(this);
        }
        Func <Tile, double> ScoreByFavorability()
        {
            if (_SelectedUnit == null)
            {
                return(i => 0);
            }

            var e = new TileEvaluator(new AIRoot(Match, _CurrentTurn.Army));

            e.ReEvaluate();
            return(i =>
            {
                return e.GetTileFavorability(i, _SelectedUnit);
            });
        }