It seems like end game condition here requires for all mines to be flagged. In classical minesweeper opening all the clean cells is enough for a win. That difference removes the fun and speed advantage of playing without flagging.
// meaning all tiles are touched or marked
// and guesses are correct
is_board_solved() {
for( var k in this.board.public ) {
// takes a single unguessed, unrevealed tile
if(
this.board.public[k].state === "unknown" &&
this.board.public[k].guess === false
) {
return( false );
}
// or one wrong mine guess
if(
this.board.public[k].guess === true &&
this.board.private[k].mine === false
) {
return( false );
}
}
return( true );
}