コード例 #1
0
        public void NeighboursAtOpposite_BottomRightCorner_returns3()
        {
            var strInitial =
                ".....X|" +
                "......|" +
                "......|" +
                "X....X";

            var world     = new World(strInitial);
            var neighbour = new Neighbour(world.CurrentWorld);

            Assert.AreEqual(3, neighbour.NrAtOpposite(0, 0));
        }
コード例 #2
0
        public void NeighboursAtOpposite_BottomEdge_returns2()
        {
            var strInitial =
                "..XX..|" +
                "......|" +
                "......|" +
                "......";

            var world     = new World(strInitial);
            var neighbour = new Neighbour(world.CurrentWorld);

            Assert.AreEqual(2, neighbour.NrAtOpposite(2, 3));
        }