Example #1
0
        public void ComputerMove()
        {
            Random rnd         = new Random();
            int    randomInput = rnd.Next(m_CurrentPlayer.PossibleMoves.Count);

            if (m_CurrentPlayer.HasMoves())
            {
                FlipSymbols(m_CurrentPlayer.PossibleMoves[randomInput]);
            }
        }
Example #2
0
        public void ChangeTurn()
        {
            Player SwapPlayer;

            m_OponentPlayer.CalculatePossibleMoves(m_gameBoard);
            if (m_OponentPlayer.HasMoves())
            {
                SwapPlayer      = m_CurrentPlayer;
                m_CurrentPlayer = m_OponentPlayer;
                m_OponentPlayer = SwapPlayer;
            }
        }