예제 #1
0
        public override Backend.Core.Game CreateGame(Container container, BoardView boardView, Color color, GameCreatorParameters parameters)
        {
            IEngine         engine = new RealEngine(container);
            PlayerControler whitePlayerControler = new BoardViewPlayerController(boardView);
            PlayerControler lolengineController  = new LolengineController(container);
            var             whitePlayer          = new Player(Color.White, whitePlayerControler);
            var             blackLolengine       = new Player(Color.Black, lolengineController);

            var game = new Backend.Core.Game(engine, whitePlayer, blackLolengine, container, true);

            whitePlayer.Game    = game;
            blackLolengine.Game = game;

            whitePlayerControler.Player = whitePlayer;
            lolengineController.Player  = blackLolengine;

            boardView.BoardViewPlayerControllers.Add((BoardViewPlayerController)whitePlayerControler);

            return(game);
        }
예제 #2
0
 /// <summary>
 /// Creates the game.
 /// </summary>
 /// <param name="container">The container.</param>
 /// <param name="boardView">The board view.</param>
 /// <param name="color">The color.</param>
 /// <param name="parameters">The parameters.</param>
 /// <returns></returns>
 public abstract Backend.Core.Game CreateGame(Container container, BoardView boardView, Color color, GameCreatorParameters parameters);
예제 #3
0
 /// <summary>
 /// Creates the game.
 /// </summary>
 /// <param name="mode">The mode.</param>
 /// <param name="container">The container.</param>
 /// <param name="boardView">The board view.</param>
 /// <param name="color">The color.</param>
 /// <param name="parameters">The parameters.</param>
 /// <returns>The game.</returns>
 public Backend.Core.Game CreateGame(Mode mode, Container container, BoardView boardView, Color color, GameCreatorParameters parameters)
 {
     return(GameCreators.FindAll(x => x.Mode == mode).First().CreateGame(container, boardView, color, parameters));
 }
예제 #4
0
        public override Backend.Core.Game CreateGame(Container container, BoardView boardView, Color color, GameCreatorParameters parameters)
        {
            IEngine         engine = new RealEngine(container);
            PlayerControler whitePlayerControler = new BoardViewPlayerController(boardView);
            PlayerControler blackPlayerControler = new UciProcessController(container, parameters.AiSearchType, parameters.AiSkillLevel, parameters.AiSearchValue);
            var             whitePlayer          = new Player(Color.White, whitePlayerControler);
            var             blackPlayer          = new Player(Color.Black, blackPlayerControler);

            var game = new Backend.Core.Game(engine, whitePlayer, blackPlayer, container, true);

            whitePlayer.Game = game;
            blackPlayer.Game = game;

            whitePlayerControler.Player = whitePlayer;
            blackPlayerControler.Player = blackPlayer;

            boardView.BoardViewPlayerControllers.Add((BoardViewPlayerController)whitePlayerControler);

            return(game);
        }