Files
basic-computer-games/77_Salvo/csharp/Targetting/ShotSelector.cs
2023-04-23 17:56:01 +10:00

18 lines
379 B
C#

namespace Salvo.Targetting;
internal abstract class ShotSelector
{
internal ShotSelector(Grid source, Grid target)
{
Source = source;
Target = target;
}
protected Grid Source { get; }
protected Grid Target { get; }
internal int NumberOfShots => Source.Ships.Sum(s => s.Shots);
internal abstract IEnumerable<Position> GetShots();
}