code: public boolean wasResourcePlayed(int resId) {
      for (Playback playback : playedSounds) {
        if (idIsForResource(playback.soundId, resId)) {
          return true;
        }
      }
      return false;
    }
docs: Returns {@code true} if the given resource was played.