Exemplo n.º 1
0
 // 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);
 }
Exemplo n.º 2
0
        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.
Exemplo n.º 3
0
 public override Point[] GetPossibleMoves(Piece[][] board)
 {
     MovesCalculator.Pioneer(this, board);
 }
Exemplo n.º 4
0
 public override Point[] GetPossibleMoves(Piece[][] board)
 {
     return(MovesCalculator.CalculateMoves(this, board, MovesCalculator.OneSquareToAnyDirection));
 }
Exemplo n.º 5
0
 public override Point[] GetPossibleMoves(Piece[][] board)
 {
     return(MovesCalculator.CalculateMoves(this, board, MovesCalculator.StraightLine));
 }
Exemplo n.º 6
0
 public override Point[] GetPossibleMoves(Piece[][] board)
 {
     return(MovesCalculator.Knight(this, board));
 }