setAt = ([prop, ...rest], f, obj) => {
    if (!prop) {
      return f(obj);
    }
    if (Array.isArray(obj)) {
      const index = parseInt(prop, 10);
      return [
        ...obj.slice(0, index),
        setAt(rest, f, obj[index]),
        ...obj.slice(index + 1),
      ];
    }
    if (typeof obj === 'object') {
      return Object.assign({}, obj, { [prop]: setAt(rest, f, obj[prop]) });
    }
    throw new Error('Bad path');
  }
Public API of Battle Prediction module.
Must be loaded first, since it defines the module's structure.

DO NOT modify single file module of `src/library/module/BattlePrediction.js` directly,
To generate the single file module, run `grunt concat:battlePredictionDev`.