public void SpotNeigbourTest(byte color, byte XCoordinate, byte YCoordinateA, byte YCoordinateB) { Tile a = new Tile(XCoordinate, YCoordinateA, color); Tile b = new Tile(XCoordinate, YCoordinateB, color); List <Tile> neighbours = new List <Tile>() { a, b }; var result = ColorSpots.GetNeighborTiles(neighbours, a); Assert.True(result.Count == 1); }
public void SpotCalculationTest(byte color, byte XCoordinate, byte YCoordinateA, byte YCoordinateB) { Tile a = new Tile(XCoordinate, YCoordinateA, color); Tile b = new Tile(XCoordinate, YCoordinateB, color); List <Tile> neighbours = new List <Tile>() { a, b }; var grouped = neighbours.GroupBy(x => x.Color).ToList(); var result = ColorSpots.Calculate(grouped); Assert.True(result.Count() == 1); }