mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 20:34:32 -08:00
29 lines
638 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|