title: Calculating slot machine payout
body: <p>A slot machine has 5 reels and displays 3 symbols per reel (no spaces or "empty" symbols). </p>
  
  <p>Payout can occur in a number of ways. Some examples...</p>
  
  <ul>
  <li>A special diamond symbol appears</li>
  <li>3 Lucky 7's appear</li>
  <li>All five symbols in the payline are identical</li>
  <li>All five symbols are the same number, but different color</li>
  <li>Etc.</li>
  </ul>
  
  <p>There are also multiple paylines that need to be checked for a payout.</p>
  
  <p><img src="https://i.stack.imgur.com/YUmqZ.jpg" alt="Examples of 30 different paylines"></p>
  
  <p>What is the most efficient way to calculate winnings for each spin? Or, is there a more efficient way than brute force to apply each payout scenario to each payline?</p>