Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static DIRECTIONS[] IntersectDirections(Hexagon[] hexagons)
- {
- List<DIRECTIONS> tempList = new List<DIRECTIONS>();
- foreach (var h in hexagons)
- {
- foreach (var direction in h.Connections.Where(direction => !tempList.Contains(direction)))
- {
- tempList.Add(direction);
- }
- }
- return tempList.ToArray();
- }
Advertisement