Ejemplo n.º 1
0
        private ICommandToken Execute(StartingRegionsToken token)
        {
            mapController.Start();

            // create bot
            GameBotFactory factory = new GameBotFactory();

            int myPlayerId = playerDictionary.First(x => x.Value == OwnerPerspective.Mine).Key;

            bot = factory.Create(GameBotType.MonteCarloTreeSearchBot, mapController.GetMap(), Difficulty.Hard,
                                 (byte)myPlayerId);

            // TODO: run to get the best move

            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Starts the game or round. Initializes the GameFlowHandler to begin the round.
        /// </summary>
        public virtual void Begin()
        {
            if (Game.RoundNumber == 0)
            {
                LastTurn = new GameBeginningTurn(PlayerOnTurn);
            }
            else
            {
                LastTurn = new GameTurn(PlayerOnTurn);
            }

            RedrawToPlayersPerspective();

            OnBegin?.Invoke();

            var factory = new GameBotFactory();
            var bot     = factory.CreateFromGame(Game, PlayerOnTurn, GameBotType.MonteCarloTreeSearchBot);

            //bot.FindBestMove();
        }