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); }
private Dictionary <Cell, int> FindHowOftenANeighbourIsReferenced(HashSet <Cell> world) { return(CellMaths.Frequencies(CellMaths.AllNeighbours(world))); }