public void notifyBeatObservers(int code) {
        for (BeatObserver observer : beatObservers) {
            if (code == Constants.BEAT_EVENT_CODE) {
                observer.updateBeat();
            } else if (code == Constants.STARTED_EVENT_CODE) {
                observer.updateStarted();
            } else if (code == Constants.ENDED_EVENT_CODE) {
                observer.updateEnded();
            }
        }
    }