コード例 #1
0
ファイル: Controller.cs プロジェクト: DanielaMurin/Checkers
        private eMoveList returnValidAIMove(ref int io_CurrRow, ref int io_CurrCol, ref int io_NextRow, ref int io_NextCol)
        {
            eMoveList moveType = eMoveList.InvalidMove;

            while (moveType == eMoveList.InvalidMove)
            {
                m_UserInputBuilder = m_CurrentPlayer.GenerateAIMove(m_CheckersBoard.BoardSize);

                moveType = m_Verifier.ReturnMoveType(m_CurrentPlayer.CheckersPiece, m_CheckersBoard.CheckerBoard, io_CurrRow, io_CurrCol, io_NextRow, io_NextCol); // checks if input is valid according to player
            }

            return(moveType);
        }