title: Scala: Random List of Val Order
body: <p>I have some of <code>val</code> that should randomly coming to list of result. Here's the code:</p>
  
  <pre><code>def motivation(name:String, score:Int){
  val quote1 = "You're not lost. You're locationally challenged." //score=10
  val quote2 = "Time is the most valuable thing a man can spend." //score=20
  val quote3 = "At times one remains faithful to a cause." //score=10
  val quote4 = "Only because its opponents do not cease to be insipid." //score=10
  val quote5 = "Life can be complicated." //score=20
  
  case Some(score) =&gt; val quoteRes = shufle(????)
  }
  </code></pre>
  
  <ol>
  <li>How do I marked score of each quotes so it will be able to calculated.</li>
  <li>How do I randomly pick the quotes based of <code>score</code> of name and do the <code>shuffle</code> the order also?</li>
  </ol>
  
  <p>for example if John(name) has 40(score) the result could be quotes2+quotes3+quotes4 or quotes4+quotes5 or quotes1+quotes2+quotes5</p>