mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 12:25:10 -08:00
18 lines
569 B
C#
18 lines
569 B
C#
namespace Salvo.Targetting;
|
|
|
|
internal abstract class ShotSelectionStrategy
|
|
{
|
|
private readonly ShotSelector _shotSelector;
|
|
protected ShotSelectionStrategy(ShotSelector shotSelector)
|
|
{
|
|
_shotSelector = shotSelector;
|
|
}
|
|
|
|
internal abstract IEnumerable<Position> GetShots(int numberOfShots);
|
|
|
|
protected bool WasSelectedPreviously(Position position) => _shotSelector.WasSelectedPreviously(position);
|
|
|
|
protected bool WasSelectedPreviously(Position position, out int turn)
|
|
=> _shotSelector.WasSelectedPreviously(position, out turn);
|
|
}
|