<commit_before>document.addEventListener('DOMContentLoaded', startGame)

// Define your `board` object here!
var board = {
  cells: [
    {row:0, col:0, isMine: true, hidden: true},
    {row:0, col:1, isMine: true, hidden: true},
    {row:0, col:2, isMine: true, hidden: true},
    {row:1, col:0, isMine: true, hidden: true},
    {row:1, col:1, isMine: false, hidden: true},
    {row:1, col:2, isMine: true, hidden: true},
    {row:2, col:0, isMine: true, hidden: true},
    {row:2, col:1, isMine: true, hidden: true},
    {row:2, col:2, isMine: true, hidden: true},
  ]


}

function startGame () {
  let cell = 0;

  for (cell in board.cells){
    board.cells[cell].surroundingMines = countSurroundingMines(cell);
  }


  // Don't remove this function call: it makes the game work!
  lib.initBoard()
}

// Define this function to look for a win condition:
//
// 1. Are all of the cells that are NOT mines visible?
// 2. Are all of the mines marked?
function checkForWin () {

  // You can use this function call to declare a winner (once you've
  // detected that they've won, that is!)<commit_msg>add event listener to chekForwin<commit_after>document.addEventListener('DOMContentLoaded', startGame)

// Define your `board` object here!
var board = {
  cells: [
    {row:0, col:0, isMine: true, hidden: true},
    {row:0, col:1, isMine: true, hidden: true},
    {row:0, col:2, isMine: true, hidden: true},
    {row:1, col:0, isMine: true, hidden: true},
    {row:1, col:1, isMine: false, hidden: true},
    {row:1, col:2, isMine: false, hidden: true},
    {row:2, col:0, isMine: true, hidden: true},
    {row:2, col:1, isMine: true, hidden: true},
    {row:2, col:2, isMine: false, hidden: true},
  ]


}

function startGame () {
  let cell = 0;

  for (cell in board.cells){
    board.cells[cell].surroundingMines = countSurroundingMines(cell);
  }

  document.addEventListener('dblclick', checkForWin


  // Don't remove this function call: it makes the game work!
  lib.initBoard()
}

// Define this function to look for a win condition:
//
// 1. Are all of the cells that are NOT mines visible?
// 2. Are all of the mines marked?
function checkForWin () {

  // You can use this function call to declare a winner (once you've
  // detected that they've won, that is!)
{'fraction_non_alphanumeric': 0.1455584872471416, 'fraction_numerical': 0.018469656992084433, 'mean_word_length': 3.5774647887323945, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1014398', 'n_tokens_mistral': 822, 'n_tokens_neox': 794, 'n_words': 271}