示例#1
0
        private void GetComputerMove()
        {
            mm.MinMax(0, this.GetMarker());
            b.PlaceMove(b.computerMove, Board.computer);

            if (b.computerMove.Equals(new Cell(0, 0)))
            {
                Console.WriteLine(this + ": A1");
            }
            else if (b.computerMove.Equals(new Cell(1, 0)))
            {
                Console.WriteLine(this + ": A2");
            }
            else if (b.computerMove.Equals(new Cell(2, 0)))
            {
                Console.WriteLine(this + ": A3");
            }
            else if (b.computerMove.Equals(new Cell(0, 1)))
            {
                Console.WriteLine(this + ": B1");
            }
            else if (b.computerMove.Equals(new Cell(1, 1)))
            {
                Console.WriteLine(this + ": B2");
            }
            else if (b.computerMove.Equals(new Cell(2, 1)))
            {
                Console.WriteLine(this + ": B3");
            }
            else if (b.computerMove.Equals(new Cell(0, 2)))
            {
                Console.WriteLine(this + ": C1");
            }
            else if (b.computerMove.Equals(new Cell(1, 2)))
            {
                Console.WriteLine(this + ": C2");
            }
            else if (b.computerMove.Equals(new Cell(2, 2)))
            {
                Console.WriteLine(this + ": C3");
            }
            Thread.Sleep(2000);
        }