public void setAnimationMode(int newAnimationMode) {
        if (gui != null) {
            // enter NO_DISPLAY_CHANGES
            if (newAnimationMode == HackController.NO_DISPLAY_CHANGES &&
                    animationMode != HackController.NO_DISPLAY_CHANGES) {
                inputPins.disableUserInput();
            }

            // exit NO_DISPLAY_CHANGES
            if (newAnimationMode != HackController.NO_DISPLAY_CHANGES &&
                    animationMode == HackController.NO_DISPLAY_CHANGES) {
                inputPins.enableUserInput();
            }

            animationMode = newAnimationMode;

            boolean animate = (animationMode == HackController.ANIMATION);
            inputPins.setAnimate(animate);
            outputPins.setAnimate(animate);
            internalPins.setAnimate(animate);
            partPins.setAnimate(animate);

            boolean displayChanges = (animationMode != HackController.NO_DISPLAY_CHANGES);
            inputPins.setDisplayChanges(displayChanges);
            outputPins.setDisplayChanges(displayChanges);
            internalPins.setDisplayChanges(displayChanges);
            partPins.setDisplayChanges(displayChanges);
        }
    }