Ejemplo n.º 1
0
 public Player(string name)
 {
     this.name    = name;
     playermap    = new PlayerMap();
     attackingmap = new PlayerMap();
     ships        = new List <Ship>();
     ships.Add(new Ship("Carrier", 5, 'C'));
     ships.Add(new Ship("BattleShip", 4, 'B'));
     ships.Add(new Ship("Cruiser", 3, 'R'));
     ships.Add(new Ship("Submarine", 3, 'S'));
     ships.Add(new Ship("Destroyer", 2, 'D'));
 }
Ejemplo n.º 2
0
 public Computer(string name)
 {
     this.name         = name;
     playermap         = new PlayerMap();
     ships             = new List <Ship>();
     directionalAttack = new List <Sea>();
     aroundtarget      = new List <Sea>();
     computermap       = new PlayerMap();
     ships.Add(new Ship("Carrier", 5, 'C'));
     ships.Add(new Ship("BattleShip", 4, 'B'));
     ships.Add(new Ship("Cruiser", 3, 'R'));
     ships.Add(new Ship("Submarine", 3, 'S'));
     ships.Add(new Ship("Destroyer", 2, 'D'));
 }