private string DrawPath(int Index) { string FinalPath = string.Empty; CellMap Loc; CubeCoord coord = _Location.ToCube(); for (int i = 0; i < 6; i++) { if ((Loc = CellMap.Find(_LocationList, coord.Neighbor(i).ToAxial())).ID != null) { if (Loc.Properties[Index] != "") { FinalPath += i + 1; } } } if (Index == 1) { return("Road" + FinalPath); } else { return("River" + FinalPath); } }
public AxialCoord[] СubeRing(AxialCoord center, int Radius) { AxialCoord[] Coords = new AxialCoord[Radius * 6]; CubeCoord cube = new CubeCoord().Neighbor(4).Scale(Radius).Add(center.ToCube()); int Index = 0; for (int i = 0; i < 6; i++) { for (int j = 0; j < Radius; j++) { Coords[Index] = new AxialCoord(cube.q, cube.r); cube = cube.Neighbor(i); Index++; } } return(Coords); }