function standReturns() {
    let a = [];
    HAND_STATES.forEach((hand, i) => {
      a.push([]);
      let value = getHandDetails(hand)[0]; // Player value
      DEALER_STATES.forEach((dealer, j) => {
        let endOdds = endM[j];
        let r = 0; // Return on bet

        endOdds.forEach((odds, k) => {
          let dHand = HAND_STATES[k];
          let v = getHandDetails(dHand)[0]; // Dealer value
          if(hand === BUST) {
            r -= odds;
          } else {
            r += odds * ((value > v) - (value < v));
          }
        });

        a[i].push(r);
      });
    });
    return a;
  }
// Calculate player's return by standing
Calculate player's return by standing
Calculate player ' s return by standing
function standReturns() {
    let a = [];
    HAND_STATES.forEach((hand, i) => {
      a.push([]);
      let value = getHandDetails(hand)[0]; 
      DEALER_STATES.forEach((dealer, j) => {
        let endOdds = endM[j];
        let r = 0; 
        endOdds.forEach((odds, k) => {
          let dHand = HAND_STATES[k];
          let v = getHandDetails(dHand)[0]; 
          if(hand === BUST) {
            r -= odds;
          } else {
            r += odds * ((value > v) - (value < v));
          }
        });
        a[i].push(r);
      });
    });
    return a;
  }
function standReturns ( ) { let a = [ ] ; HAND_STATES . forEach ( ( hand , i ) => { a . push ( [ ] ) ; let value = getHandDetails ( hand ) [ 0 ] ; DEALER_STATES . forEach ( ( dealer , j ) => { let endOdds = endM [ j ] ; let r = 0 ; endOdds . forEach ( ( odds , k ) => { let dHand = HAND_STATES [ k ] ; let v = getHandDetails ( dHand ) [ 0 ] ; if ( hand === BUST ) { r -= odds ; } else { r += odds * ( ( value > v ) - ( value < v ) ) ; } } ) ; a [ i ] . push ( r ) ; } ) ; } ) ; return a ; }
Calculate player's return by standing
Calculate player ' s return by standing
// Player value // Return on bet // Dealer value