예제 #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
        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);
        }