// Gets called multiple times during the game... public BotMain() { this.CardsHandler = new CardsHandler(this); this.LastVisibleMapUpdater = new LastVisibleMapUpdater(this); this.StatelessFogRemover = new StatelessFogRemover(this); //this.FogRemover = new StatefulFogRemover(this); this.HistoryTracker = new HistoryTracker(this); this.MovesScheduler2 = new MovesScheduler(this); this.MovesCalculator = new MovesCalculator(this); this.DeleteBadMovesTask = new DeleteBadMovesTask(this); this.TerritoryValueCalculator = new TerritoryValueCalculator(this); this.ExpansionMapUpdater = new ExpansionMapUpdater(this); this.BreakTerritoryTask = new BreakTerritoryTask(this); this.BonusValueCalculator = new BonusValueCalculator(this); this.ExpansionTask = new ExpansionTask(this); this.BonusExpansionValueCalculator = new BonusExpansionValueCalculator(this); this.BonusPickValueCalculator = new BonusPickValueCalculator(this); this.DefendTerritoryTask = new DefendTerritoryTask(this); this.DefendTerritoriesTask = new DefendTerritoriesTask(this); this.MapUpdater = new MapUpdater(this); this.PreventOpponentExpandBonusTask = new PreventOpponentExpandBonusTask(this); this.TakeTerritoriesTaskCalculator = new TakeTerritoriesTaskCalculator(this); this.OpponentDeploymentGuesser = new OpponentDeploymentGuesser(this); this.PicksEvaluator = new PicksEvaluator(this); }
private MovesCalculator.ReachableState PickBestOutcome() { var collection = MovesCalculator.GetReachableStatesThisTurn(st, game.playerToMove(), game.GetMovesLeft()).ToArray(); if (collection.Length == 0) { return(null); } return((game.playerToMove() == White) ? PickHighest(collection) : PickLowest(collection)); //return (game.playerToMove() == White) ? PickLowest(collection) : PickHighest(collection); } // The color check should only be done once.
public override Point[] GetPossibleMoves(Piece[][] board) { MovesCalculator.Pioneer(this, board); }
public override Point[] GetPossibleMoves(Piece[][] board) { return(MovesCalculator.CalculateMoves(this, board, MovesCalculator.OneSquareToAnyDirection)); }
public override Point[] GetPossibleMoves(Piece[][] board) { return(MovesCalculator.CalculateMoves(this, board, MovesCalculator.StraightLine)); }
public override Point[] GetPossibleMoves(Piece[][] board) { return(MovesCalculator.Knight(this, board)); }