title: What is the best way to convert a winning chance into a Bool?
body: <p>In my game I need to make an attack. This is based on chance.</p>
  
  <ul>
  <li>If the attack succeeds: <code>return true</code></li>
  <li>If the attack fails: <code>return false</code></li>
  </ul>
  
  <p>Here is my function I am trying to complete:</p>
  
  <pre><code>func didWinAttack(withChances chance: Double) -&gt; Bool {
  
  }
  </code></pre>
  
  <p>For example, <code>didWinAttack(withChances: 0.7)</code> means that I should win ~70% of the time. This means that the <em>majority</em> of the time I should get <code>true</code> as a result.</p>
  
  <p>What is the best way to achieve this? Can <code>Type.random(Range)</code> come in useful here?</p>