Esempio n. 1
0
        // Передвижение фишек по доске
        private void makeMoves(List moves, CheckersBoard board)
        {
            List moveList = new List();
            int  from, to = 0;

            from = (int)moves.pop_front();
            while (!moves.isEmpty())
            {
                to = (int)moves.pop_front();
                moveList.push_back(new Move(from, to));
                from = to;
            }
            board.move(moveList);
        }
Esempio n. 2
0
        public void play()
        {
            try
            {
                List moves = minimax(board);

                if (!moves.isEmpty())
                {
                    board.move(moves);
                }
            }
            catch
            {
            }
        }