js/sketch.js
//frames that pass between replay moves
frames that pass between replay moves
frames that pass between replay moves
function updateReplay() {
    if (replayIndex >= TOTAL_MOVES) {
        return;
    }
    if ((frameCount - replayStartFrame) == replaySpeed) {
        replayStartFrame += replaySpeed;
        let a = parseInt(replayMoves[replayIndex * 3]);
        let i = parseInt(replayMoves[replayIndex * 3 + 1]);
        let n = parseInt(replayMoves[replayIndex * 3 + 2]);
        a == 0 ? rotateRow(i, n) : rotateCol(i, n);
        let _found = checkWords();
        moves--;
        movesPulse = 3;
        if (a == 0) {
            movesMade.push({ dir: "row", i: selectedRow, n: rot % boardSize, found: _found });
        } else {
            movesMade.push({ dir: "col", i: selectedCol, n: rot % boardSize, found: _found });
        }
        replayIndex++;
    }
}
function updateReplay ( ) { if ( replayIndex >= TOTAL_MOVES ) { return ; } if ( ( frameCount - replayStartFrame ) == replaySpeed ) { replayStartFrame += replaySpeed ; let a = parseInt ( replayMoves [ replayIndex * 3 ] ) ; let i = parseInt ( replayMoves [ replayIndex * 3 + 1 ] ) ; let n = parseInt ( replayMoves [ replayIndex * 3 + 2 ] ) ; a == 0 ? rotateRow ( i , n ) : rotateCol ( i , n ) ; let _found = checkWords ( ) ; moves -- ; movesPulse = 3 ; if ( a == 0 ) { movesMade . push ( { dir : "row" , i : selectedRow , n : rot % boardSize , found : _found } ) ; } else { movesMade . push ( { dir : "col" , i : selectedCol , n : rot % boardSize , found : _found } ) ; } replayIndex ++ ; } }
frames that pass between replay moves
frames that pass between replay moves