Esempio n. 1
0
        public void Frequencies()
        {
            var freqs = CellMaths.Frequencies(new List <Cell> {
                new Cell(1, 1), new Cell(1, 1)
            });

            CollectionAssert.AreEquivalent(new Dictionary <Cell, int>
            {
                { new Cell(1, 1), 2 }
            }, freqs);
        }
Esempio n. 2
0
 private Dictionary <Cell, int> FindHowOftenANeighbourIsReferenced(HashSet <Cell> world)
 {
     return(CellMaths.Frequencies(CellMaths.AllNeighbours(world)));
 }