Ejemplo n.º 1
0
        public void TestBlock()
        {
            var block = new[, ]
            {
                { 1, 1 },
                { 1, 1 }
            };

            ConwayLife.GetGeneration(block, 1).Should().BeEquivalentTo(block);
        }
Ejemplo n.º 2
0
        public void TestBeeHive()
        {
            var beeHive = new[, ]
            {
                { 0, 1, 1, 0 },
                { 1, 0, 0, 1 },
                { 0, 1, 1, 0 }
            };

            ConwayLife.GetGeneration(beeHive, 1).Should().BeEquivalentTo(beeHive);
        }
Ejemplo n.º 3
0
        public void TestEmpty()
        {
            var empty = new[, ]
            {
                { 0, 0, 0 },
                { 0, 0, 0 },
                { 0, 0, 0 }
            };

            ConwayLife.GetGeneration(empty, 1).Should().BeEquivalentTo(new int [0, 0]);
        }