diff --git a/84 Super Star Trek/csharp/Game.cs b/84 Super Star Trek/csharp/Game.cs index 92c16a83..274e2948 100644 --- a/84 Super Star Trek/csharp/Game.cs +++ b/84 Super Star Trek/csharp/Game.cs @@ -51,8 +51,6 @@ namespace SuperStarTrek while (!gameOver) { - _enterprise.Quadrant.Display(Strings.NowEntering); - var command = _input.GetCommand(); var result = _enterprise.Execute(command); diff --git a/84 Super Star Trek/csharp/Space/Quadrant.cs b/84 Super Star Trek/csharp/Space/Quadrant.cs index 29f8e0ce..694f7fc8 100644 --- a/84 Super Star Trek/csharp/Space/Quadrant.cs +++ b/84 Super Star Trek/csharp/Space/Quadrant.cs @@ -14,7 +14,7 @@ namespace SuperStarTrek.Space private readonly Dictionary _sectors; private readonly Enterprise _enterprise; private readonly Output _output; - private bool _displayed = false; + private bool _entered = false; internal Quadrant( QuadrantInfo info, @@ -77,9 +77,11 @@ namespace SuperStarTrek.Space internal void Display(string textFormat) { - if (_displayed) { return; } - - _output.Write(textFormat, this); + if (!_entered) + { + _output.Write(textFormat, this); + _entered = true; + } if (_info.KlingonCount > 0) { @@ -88,8 +90,6 @@ namespace SuperStarTrek.Space } _enterprise.Execute(Command.SRS); - - _displayed = true; } internal bool HasObjectAt(Coordinates coordinates) => _sectors.ContainsKey(coordinates); diff --git a/84 Super Star Trek/csharp/Systems/WarpEngines.cs b/84 Super Star Trek/csharp/Systems/WarpEngines.cs index 4203f4e8..096d0e43 100644 --- a/84 Super Star Trek/csharp/Systems/WarpEngines.cs +++ b/84 Super Star Trek/csharp/Systems/WarpEngines.cs @@ -1,6 +1,7 @@ using System; using SuperStarTrek.Commands; using SuperStarTrek.Objects; +using SuperStarTrek.Resources; using SuperStarTrek.Space; namespace SuperStarTrek.Systems @@ -39,6 +40,8 @@ namespace SuperStarTrek.Systems _enterprise.PhotonTubes.ReplenishTorpedoes(); } + _enterprise.Quadrant.Display(Strings.NowEntering); + return CommandResult.Elapsed(timeElapsed); }