コード例 #1
0
        public void GetNeigbourStatesForCenterCell()
        {
            var strState =
                "OOO|" +
                "XXX|" +
                "OOO";

            var state = HelperMethods.StringToMatrix(strState, false);

            var neighbour = new Neighbour(state);
            LivingNeighbours neighbourStates = neighbour.NrOfSuroundingLivingNeighbours(1, 1);

            Assert.AreEqual(LivingNeighbours.C2, neighbourStates);
        }
コード例 #2
0
 public Cell(State state, LivingNeighbours livingNeighbours)
 {
     this.State            = state;
     this.LivingNeighbours = livingNeighbours;
 }