<commit_before>var Cell = require("./Cell");

function Board(boardString) {
  this.board = boardString.split().map(function(e) {new Cell(e == 'X')});
}

Board.prototype.fire = function(x, y) {
  this.board[y * 10 + x].hit = true;
  return this.board[y * 10 + x].isShip;
};

Board.prototype.isGameOver = function() {
  return this.board.filter(function(cell) {
      return cell.isShip && !cell.isHit;
  }).length < 1;<commit_msg>Fix some small issues in board creation<commit_after>var Cell = require("./Cell");

function Board(boardString) {
  this.board = boardString.split("").map(function(e) {
    if(e == 'X') {
      return new Cell(true);
    }
    return new Cell(false);
  });
}

Board.prototype.fire = function(x, y) {
  this.board[y * 10 + x].isHit = true;
  return this.board[y * 10 + x].isShip;
};

Board.prototype.isGameOver = function() {
  return this.board.filter(function(cell) {
      return cell.isShip && !cell.isHit;
  }).length < 1;
{'fraction_non_alphanumeric': 0.18010471204188483, 'fraction_numerical': 0.010471204188481676, 'mean_word_length': 3.6862745098039214, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6777820', 'n_tokens_mistral': 344, 'n_tokens_neox': 337, 'n_words': 70}