Example #1
0
        public void CreateGame(IQuoridorBot uninitializedBot, string botName, GameConstraints gameConstraints, string initialProgress)
        {
            if (currentIpvBGame != null)
            {
                StopGame();
            }

            currentIpvBGame = disableBotTimeout
                                                                        ? gameFactory.CreateNewGame(uninitializedBot,
                                                                                                    botName,
                                                                                                    new GameConstraints(Timeout.InfiniteTimeSpan,
                                                                                                                        gameConstraints.MaximalMovesPerPlayer),
                                                                                                    initialProgress)
                                                                        : gameFactory.CreateNewGame(uninitializedBot,
                                                                                                    botName,
                                                                                                    gameConstraints,
                                                                                                    initialProgress);

            currentIpvBGame.DebugMessageAvailable   += OnDebugMessageAvailable;
            currentIpvBGame.NextBoardstateAvailable += OnNextBoardstateAvailable;
            currentIpvBGame.WinnerAvailable         += OnWinnerAvailable;
        }