Ejemplo n.º 1
0
        /// <summary>
        /// Uses statically assigned values and the minimax algorithum to take a move.
        /// </summary>
        public void StaticTakeTurn()
        {
            if (r == null)
            {
                r = new Random();
            }

            int ranChance = r.Next(8);

            Minimax max;

            if (ranChance < m_Difficulty)
            {
                m_M.UpdateBoard(this.m_Arr);
                max        = m_M.FindNextMove(m_Difficulty);
                this.m_Arr = max.MG;
                m_Turn     = 'X';
            }
            else
            {
                Randomisation();
            }
        }