private void frameUpdate() {
        // Update the frame counter. Used by the zombie AI, etc.
        if (frameCounter > FPS) {
            frameCounter = 1;
        }
        
        // Call the right method depending on the game mode.
        switch (mode) {
            case TITLE:
                titleHelper();
                break;
            case PAUSED:
                // If paused.
            	pausedHelper();
                break;
            case PLAYING:
                // If playing.
            	playingHelper();
            	if (graphics != null) {
            		graphics.update();
            	}
                break;
            default:
                break;
        }
        
        // Repaint the GUI.
        frame.repaint();
    }