ntt123 commited on
Commit
f4ae2a9
1 Parent(s): 29e10a0

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +1 -1
index.html CHANGED
@@ -41,7 +41,7 @@
41
  }
42
  this.is_terminated = function () {
43
  // check if the game is terminated
44
- const num_empty_cells = this.board.reduce((a, b) => a + b);
45
  if (num_empty_cells == 0) return true;
46
  for (let i = 0; i < this.num_rows; i++) {
47
  for (let j = 0; j < this.num_cols; j++) {
 
41
  }
42
  this.is_terminated = function () {
43
  // check if the game is terminated
44
+ const num_empty_cells = this.board.reduce((a, b) => a + (b==0));
45
  if (num_empty_cells == 0) return true;
46
  for (let i = 0; i < this.num_rows; i++) {
47
  for (let j = 0; j < this.num_cols; j++) {