src/Visualizer.java
/**
     * Steps "steps" times or until the program terminates, whichever occurs
     * earlier.
     *
     * @param steps - maximum number of steps to take
     */
Steps "steps" times or until the program terminates, whichever occurs
earlier.

@param steps - maximum number of steps to take
Steps " steps " times or until the program terminates whichever occurs earlier . @param steps - maximum number of steps to take
private void stepAtMost(int steps) {
        for (int i = 0; i < steps; i++) {
            if (interp.getProgramCounter() >= interp.getInstructions().length) {
                System.out.println("step successfully executed "
                        + i + " steps before reaching the end of the program.");
                return;
            }
            try {
                step();
            } catch (Exception e) {
                e.printStackTrace();
                System.out.println("step returned prematurely.");
                return;
            }
        }
        System.out.println("All " + steps + " steps executed successfully.");
    }
private void stepAtMost ( int steps ) { for ( int i = 0 ; i < steps ; i ++ ) { if ( interp . getProgramCounter ( ) >= interp . getInstructions ( ) . length ) { System . out . println ( "step successfully executed " + i + " steps before reaching the end of the program." ) ; return ; } try { step ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . out . println ( "step returned prematurely." ) ; return ; } } System . out . println ( "All " + steps + " steps executed successfully." ) ; }
Steps "steps" times or until the program terminates, whichever occurs
 earlier.
Steps " steps " times or until the program terminates whichever occurs earlier .