public Gunner(int rows, int cols, IEnumerable <int> shipLengths) { evidenceGrid = new Grid(rows, cols); shipsToShoot = new List <int>(shipLengths.OrderByDescending(l => l)); ShootingTactics = ShootingTactics.Random; squareTerminator = new SquareTerminator(rows, cols); shootingTacticsFactory = new ShootingTacticsFactory(evidenceGrid, squaresHit, shipsToShoot); targetSelect = shootingTacticsFactory.GetTactics(ShootingTactics.Random); }
public Shipwright(int rows, int cols) { this.rows = rows; this.cols = cols; terminator = new SquareTerminator(rows, cols); }