コード例 #1
0
        public bool isSameLetterInMemory(int i_Row, int i_Column, char i_Letter, out CellForComputer io_ExistCell)
        {
            bool isLetterExist = true;

            io_ExistCell = m_ListOfMemoryLetters.Find(item => item.Letter == i_Letter && (item.Row != i_Row || item.Col != i_Column));
            if (io_ExistCell.Row == 0 && io_ExistCell.Col == 0 && io_ExistCell.Letter == 0)
            {
                isLetterExist = false;
            }

            return isLetterExist;
        }
コード例 #2
0
 private bool IsSameLetterInMemory(int i_SaveIndexRowTurn1, int i_SaveIndexColumnTurn1, char i_Letter, out CellForComputer i_CellMemory)
 {
     return m_Pc.isSameLetterInMemory(i_SaveIndexRowTurn1, i_SaveIndexColumnTurn1, i_Letter, out i_CellMemory);
 }
コード例 #3
0
        public bool GetCouple(out CellForComputer io_FirstCell, out CellForComputer io_SecondCell)
        {
            bool isCoupleFound = false;
               int i = 0;
               int j = 0;
               io_FirstCell = new CellForComputer();
               io_SecondCell = new CellForComputer();

               for(i = 0; i < m_ListOfMemoryLetters.Count && !isCoupleFound; i++)
            {
                for(j = i + 1; j < m_ListOfMemoryLetters.Count; j++)
                {
                    if(m_ListOfMemoryLetters[i].Letter.Equals(m_ListOfMemoryLetters[j].Letter))
                    {
                        isCoupleFound = true;
                        io_FirstCell = m_ListOfMemoryLetters[i];
                        io_SecondCell = m_ListOfMemoryLetters[j];
                        break;
                    }
                }
            }

            return isCoupleFound;
        }