Files
basic-computer-games/77_Salvo/csharp/Targetting/ComputerShotSelector.cs
2023-05-10 07:54:36 +10:00

29 lines
638 B
C#

namespace Salvo.Targetting;
internal class ComputerShotSelector : ShotSelector
{
private readonly bool _displayShots;
internal ComputerShotSelector(Grid source, Grid target, bool displayShots)
: base(source, target)
{
_displayShots = displayShots;
}
internal override IEnumerable<Position> GetShots()
{
throw new NotImplementedException();
}
private void DisplayShots(IEnumerable<Position> shots, IReadWrite io)
{
if (_displayShots)
{
foreach (var shot in shots)
{
io.WriteLine(shot);
}
}
}
}