public MaptileInfo(Landtile landtile, Unit unit, bool reachableForSelectedUnit, bool availableForSelectedUnitMove, bool selectedUnitRoute) { Unit = unit; Land = landtile; ReachableForSelectedUnit = reachableForSelectedUnit; AvailableForSelectedUnitMove = availableForSelectedUnitMove; SelectedUnitRoute = selectedUnitRoute; }
private static void PrintLandtileTitle(MaptileInfo tileInfo) { Landtile landtile = tileInfo.Land; Console.Write("["); WriteColored(landtile.ConsoleImage); Console.Write("] "); string name = tileInfo.Land.DisplayedName; Console.WriteLine(name + $"({map.SelectedTileX}; {map.SelectedTileY})"); }
private static Landtile[,] ParseMap(string chars, ICollection <Landtile> landtiles, int x, int y) { var outMap = new Landtile[x, y]; int i = 0; for (int r = 0; r < y; r++) { for (int c = 0; c < x; c++) { outMap[c, r] = landtiles.First((Landtile _landtile) => _landtile.ConsoleImage.Char == chars[i]); i++; } } return(outMap); }
private static void PrintLandtileAndUnitTitle(MaptileInfo tileInfo) { Landtile landtile = tileInfo.Land; Console.Write("["); WriteColored(landtile.ConsoleImage); Console.Write("]"); Unit unit = tileInfo.Unit; Console.Write("["); WriteColored(tileInfo.Unit.ConsoleImage); Console.Write("]"); string landtileName = tileInfo.Land.DisplayedName; string unitName = tileInfo.Unit.DisplayedName; Console.WriteLine(" " + landtileName + "/" + unitName + $"({map.SelectedTileX}; {map.SelectedTileY})"); }