by sadkingbilly · 12y ago · 0 comments
for (var i = 0; i < this.shipLength; i++) {
if (direction === Ship.DIRECTION_VERTICAL) {
if (this.playerGrid.cells[x + i][y] === CONST.TYPE_SHIP ||
this.playerGrid.cells[x + i][y] === CONST.TYPE_MISS ||
this.playerGrid.cells[x + i][y] === CONST.TYPE_SUNK) {
return false;
}
}