Esempio n. 1
0
        public void IsValidPointTest()
        {
            uint size = 25;
            GameOfLife_Accessor gof = new GameOfLife_Accessor(size);

            Assert.AreEqual(true, gof.IsValidPoint(0, 0));
            Assert.AreEqual(true, gof.IsValidPoint((int)size - 1, (int)size - 1));
            Assert.AreEqual(false, gof.IsValidPoint(-1, -1));
            Assert.AreEqual(false, gof.IsValidPoint((int)size, (int)size));
        }
Esempio n. 2
0
 public void GetWorldCopyTest()
 {
     uint size = 25;
     GameOfLife_Accessor gof = new GameOfLife_Accessor(size);
     int?[,] worldCopy = gof.GetWorldCopy();
     for (uint x = 0; x < size; x++)
     {
         for (uint y = 0; y < size; y++)
         {
             Assert.AreEqual(gof[x, y], worldCopy[x, y]);
         }
     }
 }