js/pgn.js
// Special case: first move, so there is no previous move
Special case: first move, so there is no previous move
Special case : first move so there is no previous move
function existing_first_move(move) {
            function first_move_notation() {
                if (typeof getMove(0) == 'undefined') return null;
                return getMove(0).notation.notation;
            }
            set_to_start();
            var pgn_move = game.move(move);
            if (typeof pgn_move == "undefined") {
                return null;
             } else if (first_move_notation() == pgn_move.san) {
                return 0;
             } else {   
                return existing_variation_first_move(pgn_move);
             }
        }
function existing_first_move ( move ) { function first_move_notation ( ) { if ( typeof getMove ( 0 ) == 'undefined' ) return null ; return getMove ( 0 ) . notation . notation ; } set_to_start ( ) ; var pgn_move = game . move ( move ) ; if ( typeof pgn_move == "undefined" ) { return null ; } else if ( first_move_notation ( ) == pgn_move . san ) { return 0 ; } else { return existing_variation_first_move ( pgn_move ) ; } }
Special case: first move, so there is no previous move
Special case : first move so there is no previous move
// TODO: Could be a variation of the first move ...