function Field(opt_parent) {
  this.squares_ = new Array(WIDTH);
  for (var x = 0; x < WIDTH; x++) {
    this.squares_[x] = new Array(HEIGHT);
    for (var y = 0; y < HEIGHT; y++) {
      if (opt_parent) {
        this.squares_[x][y] = new Square(opt_parent.squares_[x][y]);
      } else {
        this.squares_[x][y] = new Square(null, x, y);
      }
    }
  }
}
// Constructor for playing field (basically a 2D array of squares).
Constructor for playing field (basically a 2D array of squares).
Constructor for playing field ( basically a 2D array of squares ) .
function Field(opt_parent) {
  this.squares_ = new Array(WIDTH);
  for (var x = 0; x < WIDTH; x++) {
    this.squares_[x] = new Array(HEIGHT);
    for (var y = 0; y < HEIGHT; y++) {
      if (opt_parent) {
        this.squares_[x][y] = new Square(opt_parent.squares_[x][y]);
      } else {
        this.squares_[x][y] = new Square(null, x, y);
      }
    }
  }
}
function Field ( opt_parent ) { this . squares_ = new Array ( WIDTH ) ; for ( var x = 0 ; x < WIDTH ; x ++ ) { this . squares_ [ x ] = new Array ( HEIGHT ) ; for ( var y = 0 ; y < HEIGHT ; y ++ ) { if ( opt_parent ) { this . squares_ [ x ] [ y ] = new Square ( opt_parent . squares_ [ x ] [ y ] ) ; } else { this . squares_ [ x ] [ y ] = new Square ( null , x , y ) ; } } } }
Constructor for playing field (basically a 2D array of squares).
Constructor for playing field ( basically a 2D array of squares ) .