<commit_before>/**
 *
 * @param  {int[][]} grid
 * @param  {int} value value which we investigate of winning
 * @return {boolean}
 */
module.exports = function(grid, value, WINNING_LEN = 5) {

  function isCorrectPosition(x, y) {
    return x >= 0 && x < grid.length && y >= 0 && y < grid[x].length;
  }

  for (let y=0; y<grid[0].length; y++) {
    for (let x=0; x<grid.length; x++) {
      if (grid[y][x] === value) {
        //go to right
        let rightFound = true;
        for (let i=1; i<WINNING_LEN; i++) {
          if (!isCorrectPosition(x+i, y) || grid[y][x+i] !== value)
            rightFound = false;
        }<commit_msg>fixes<commit_after>/**
 *
 * @param  {int[][]} grid
 * @param  {int} value value which we investigate of winning
 * @return {boolean}
 */
module.exports = function(grid, value, WINNING_LEN = 5) {

  function isCorrectPosition(x, y) {
    return x >= 0 && x < grid.length && y >= 0 && y < grid[x].length;
  }

  for (let y=0; y<grid.length; y++) {
    for (let x=0; x<grid[0].length; x++) {
      if (grid[y][x] === value) {
        //go to right
        let rightFound = true;
        for (let i=1; i<WINNING_LEN; i++) {
          if (!isCorrectPosition(x+i, y) || grid[y][x+i] !== value)
            rightFound = false;
        }
{'fraction_non_alphanumeric': 0.1892744479495268, 'fraction_numerical': 0.011041009463722398, 'mean_word_length': 2.4958677685950414, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 7, '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': '1726987', 'n_tokens_mistral': 468, 'n_tokens_neox': 456, 'n_words': 126}