public void EmptyHexagonTest() { // Add player PartData partData = new PartData(); Part hexagon = new Part { shape = new GameObject(), type = 0 }; AxialCoordinate coord = new AxialCoordinate { x = 0, y = 0 }; partData.addPart(coord, hexagon); // Get all empty neighbours (ie, places to attach objects) List <AxialCoordinate> neighbours = partData.getEmptyNeighbors(coord); // If 6 free edges, pass Assert.True(neighbours.Count == 6); }
public void EmptyTriangleTest() { // Add player PartData partData = new PartData(); Part triangle = new Part { shape = new GameObject(), type = -1 }; AxialCoordinate coord = new AxialCoordinate { x = 0, y = 0 }; partData.addPart(coord, triangle); // Get all empty neighbours (ie, places to attach objects - there should be // 0 for a triangle) List <AxialCoordinate> neighbours = partData.getEmptyNeighbors(coord); // If 0 free edges, pass Assert.True(neighbours.Count == 0); }