rollHalflings(i) {
    if (!this.state.locked[i]) {
      let updateLock = this.state.locked.slice();
      updateLock[i] = true;
      let updateDie = this.state.halflingDice.slice();
      updateDie[i] = Math.ceil(Math.random() * 6);
      this.setState(() => ({
        halflingDice: updateDie,
        locked: updateLock,
      }));
    }
    return this.state.halflingDice[i];
  }
/**
   * Roll dice for halflings.
   * Currently rolls individual die, locking once rolled.
   * => value of rolled die.
   */
Roll dice for halflings.
Currently rolls individual die, locking once rolled.
=> value of rolled die.
Roll dice for halflings . Currently rolls individual die locking once rolled . = > value of rolled die .
rollHalflings(i) {
    if (!this.state.locked[i]) {
      let updateLock = this.state.locked.slice();
      updateLock[i] = true;
      let updateDie = this.state.halflingDice.slice();
      updateDie[i] = Math.ceil(Math.random() * 6);
      this.setState(() => ({
        halflingDice: updateDie,
        locked: updateLock,
      }));
    }
    return this.state.halflingDice[i];
  }
rollHalflings ( i ) { if ( ! this . state . locked [ i ] ) { let updateLock = this . state . locked . slice ( ) ; updateLock [ i ] = true ; let updateDie = this . state . halflingDice . slice ( ) ; updateDie [ i ] = Math . ceil ( Math . random ( ) * 6 ) ; this . setState ( ( ) => ( { halflingDice : updateDie , locked : updateLock , } ) ) ; } return this . state . halflingDice [ i ] ; }
Roll dice for halflings.
Roll dice for halflings .