function _weaponColour() {
  const randomNumber = Math.random();
  const blueThreshold = caseData.gradeOdds.blue;
  const purpleThreshold = blueThreshold + caseData.gradeOdds.purple;
  const pinkThreshold = purpleThreshold + caseData.gradeOdds.pink;
  const redThreshold = pinkThreshold + caseData.gradeOdds.red;

  let colour = 'yellow';
  if (randomNumber <= blueThreshold) colour = 'blue';
  else if (randomNumber <= purpleThreshold) colour = 'purple';
  else if (randomNumber <= pinkThreshold) colour = 'pink';
  else if (randomNumber <= redThreshold) colour = 'red';

  return colour;
}
/**
 * Generate a weapon colour based on the grade odds.
 * @returns {string}
 */
Generate a weapon colour based on the grade odds.
@returns {string}
Generate a weapon colour based on the grade odds . @returns { string }
function _weaponColour() {
  const randomNumber = Math.random();
  const blueThreshold = caseData.gradeOdds.blue;
  const purpleThreshold = blueThreshold + caseData.gradeOdds.purple;
  const pinkThreshold = purpleThreshold + caseData.gradeOdds.pink;
  const redThreshold = pinkThreshold + caseData.gradeOdds.red;
  let colour = 'yellow';
  if (randomNumber <= blueThreshold) colour = 'blue';
  else if (randomNumber <= purpleThreshold) colour = 'purple';
  else if (randomNumber <= pinkThreshold) colour = 'pink';
  else if (randomNumber <= redThreshold) colour = 'red';
  return colour;
}
function _weaponColour ( ) { const randomNumber = Math . random ( ) ; const blueThreshold = caseData . gradeOdds . blue ; const purpleThreshold = blueThreshold + caseData . gradeOdds . purple ; const pinkThreshold = purpleThreshold + caseData . gradeOdds . pink ; const redThreshold = pinkThreshold + caseData . gradeOdds . red ; let colour = 'yellow' ; if ( randomNumber <= blueThreshold ) colour = 'blue' ; else if ( randomNumber <= purpleThreshold ) colour = 'purple' ; else if ( randomNumber <= pinkThreshold ) colour = 'pink' ; else if ( randomNumber <= redThreshold ) colour = 'red' ; return colour ; }
Generate a weapon colour based on the grade odds.
Generate a weapon colour based on the grade odds .