Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public Shipwright(int rows, int cols)
 {
     this.rows  = rows;
     this.cols  = cols;
     terminator = new SquareTerminator(rows, cols);
 }