private void humanPlayerPlay(string i_FromSlotKey, string i_ToSlotKey)
 {
     try
     {
         m_CheckersLogic.ProcessUserMove(i_FromSlotKey, i_ToSlotKey);
     }
     catch (Exception i_Exception)
     {
         MessageBox.Show(i_Exception.ToString());
     }
 }
示例#2
0
        private void humanPlayerPlay()
        {
            bool processSucceeded = false;

            while (!processSucceeded && !m_PlayerQuit)
            {
                r_UIEngine.GetUserMove(m_GameLogic.PlayerTurn.Name, m_GameLogic.PlayerTurn.RegularCheckersMen.Sign, out string fromSlotKey, out string toSlotKey, out m_PlayerQuit);
                if (!m_PlayerQuit)
                {
                    processSucceeded = m_GameLogic.ProcessUserMove(fromSlotKey, toSlotKey, out Error? error);
                    if (!processSucceeded)
                    {
                        r_UIEngine.DisplayLogicError(error.Value);
                    }
                }
            }
        }