Ejemplo n.º 1
0
        public override void ExecuteOnValue(DebugBoardWindowViewModel value)
        {
            this.currentViewModel = value;
            ComputerMoveCalculator moveCalculator = new ComputerMoveCalculator(value.HexBoard.Game, this.MoveCompleted, 1);

            moveCalculator.Move();
        }
Ejemplo n.º 2
0
        public override void ExecuteOnValue(HexBoardViewModel value)
        {
            this.currentViewModel = value;
            ComputerMoveCalculator moveCalculator = new ComputerMoveCalculator(value.Game, this.MoveCompleted, this.lookaheadDepth);

            moveCalculator.Move();
        }
Ejemplo n.º 3
0
        private static void ShowBestMove(HexBoardViewModel boardViewModel, Occupied player)
        {
            const int MaxSkillLevel = 6;

            for (int skillLevel = 1; skillLevel <= MaxSkillLevel; skillLevel++)
            {
                int currentSkillLevel = skillLevel;
                Action <ComputerMoveData> finishedAction = cmd => ShowBestMoveCompleted(cmd, boardViewModel, currentSkillLevel);

                ComputerMoveCalculator computerMoveCalculatorX = new ComputerMoveCalculator(boardViewModel.Game, finishedAction, skillLevel);
                computerMoveCalculatorX.ForcePlayer = player;
                computerMoveCalculatorX.Move();
            }
        }