Use common library in SuperStarTrek

This commit is contained in:
Andrew Cooper
2022-03-22 17:55:44 +11:00
parent 4fb62ce30c
commit 42c21bbc62
57 changed files with 1595 additions and 1682 deletions

View File

@@ -1,21 +1,21 @@
using System.Collections.Generic;
using System.Linq;
using Games.Common.IO;
using SuperStarTrek.Resources;
using SuperStarTrek.Space;
namespace SuperStarTrek.Systems.ComputerFunctions
namespace SuperStarTrek.Systems.ComputerFunctions;
internal class GalaxyRegionMap : GalacticReport
{
internal class GalaxyRegionMap : GalacticReport
internal GalaxyRegionMap(IReadWrite io, Galaxy galaxy)
: base("Galaxy 'region name' map", io, galaxy)
{
internal GalaxyRegionMap(Output output, Galaxy galaxy)
: base("Galaxy 'region name' map", output, galaxy)
{
}
protected override void WriteHeader(Quadrant quadrant) =>
Output.WriteLine(" The Galaxy");
protected override IEnumerable<string> GetRowData() =>
Strings.RegionNames.Split('\n').Select(n => n.TrimEnd('\r'));
}
protected override void WriteHeader(Quadrant quadrant) =>
IO.WriteLine(" The Galaxy");
protected override IEnumerable<string> GetRowData() =>
Strings.RegionNames.Split('\n').Select(n => n.TrimEnd('\r'));
}