function checkGameOver(level) {
    var minesCount = gLevel[level].MINES;
    var size = gLevel[level].SIZE;
    var marked = gState.markedCount;
    var shown = gState.shownCount;

    // console.log('marked:', marked, 'shown:', shown);
    // console.log('minesCount:', minesCount, '(size * size) - minesCount)', (size * size) - minesCount);
    if (marked === minesCount && shown === (size * size) - minesCount) {
        gameOver();
        checkBestScore(gCurrLevel);
        // CR: I would put it in the gameOver func.
        changeEmogi(EMOGI_WIN);

    }
}
// Game ends when all mines are marked and all the other cells are shown
Game ends when all mines are marked and all the other cells are shown
Game ends when all mines are marked and all the other cells are shown
function checkGameOver(level) {
    var minesCount = gLevel[level].MINES;
    var size = gLevel[level].SIZE;
    var marked = gState.markedCount;
    var shown = gState.shownCount;
    if (marked === minesCount && shown === (size * size) - minesCount) {
        gameOver();
        checkBestScore(gCurrLevel);
        changeEmogi(EMOGI_WIN);
    }
}
function checkGameOver ( level ) { var minesCount = gLevel [ level ] . MINES ; var size = gLevel [ level ] . SIZE ; var marked = gState . markedCount ; var shown = gState . shownCount ; if ( marked === minesCount && shown === ( size * size ) - minesCount ) { gameOver ( ) ; checkBestScore ( gCurrLevel ) ; changeEmogi ( EMOGI_WIN ) ; } }
Game ends when all mines are marked and all the other cells are shown
Game ends when all mines are marked and all the other cells are shown
// console.log('marked:', marked, 'shown:', shown); // console.log('minesCount:', minesCount, '(size * size) - minesCount)', (size * size) - minesCount); // CR: I would put it in the gameOver func.