Esempio n. 1
0
        public void ConstructionTest()
        {
            PuzzleRow row = new PuzzleRow(0, 9);

            Assert.IsNotNull(row.Blocks);
            Assert.IsNotNull(row.Squares);
            Assert.AreEqual(0, row.index);
        }
Esempio n. 2
0
        public Puzzle(int iSeed, int iSize, int iDifficulty)
        {
            m_iSeed = iSeed;
            m_iSize = iSize;
            m_iDifficulty = iDifficulty;

            m_Rand = new Random(iSeed);
            m_Rows = new PuzzleRow[m_iSize];
            for (int i = 0; i < iSize; i++)
            {
                m_Rows[i] = new PuzzleRow(iSize);
            }

            GenerateSolution();
            GenerateClues();
        }
Esempio n. 3
0
 private void SetMarker()
 {
     m_MarkerRows = new PuzzleRow[m_Rows.Length];
     for (int i = 0; i < m_MarkerRows.Length; i++)
     {
         m_MarkerRows[i] = new PuzzleRow(m_Rows[i]);
     }
 }