static/sketch.js
/** 
 * Driver script for the minesweeper app
 */
Driver script for the minesweeper app
Driver script for the minesweeper app
function Mine(i, j, w) {
    this.i = i; 
    this.j = j; 
    this.x = i*w; 
    this.y = j*w; 
    this.w = w; 
    this.nbs = 0; 
    if (random(1) < 0.2) { this.boom = true; } 
    else { this.boom = false; } 
    this.clicked = false;
  }
function Mine ( i , j , w ) { this . i = i ; this . j = j ; this . x = i * w ; this . y = j * w ; this . w = w ; this . nbs = 0 ; if ( random ( 1 ) < 0.2 ) { this . boom = true ; } else { this . boom = false ; } this . clicked = false ; }
Driver script for the minesweeper app
Driver script for the minesweeper app
// nearby mines 