fire: function(guess) {
for (var i = 0; i < this.numShips; i++) {
var ship = this.ships[i];
var index = ship.location.indexOf(guess);
if (index >= 0) {
ship.hits[index] = "hit";
view.displayHit (guess);
view.displayMessage ("Есть попадание!");
if (this.isSunk(ship)) {
this.shipsSunk++;
}
return true;
}
}
return false;