title: How to randomly draw something once in love2d
body: <p>I'm currently trying to create brick breaker using love2d but the problem is whenever is used <strong>math.random()</strong> to generate random bricks the love application keeps running it multiple times and the brick moves constantly.</p>
  <p>EDIT: So I want to generate bricks at particular column but the rows should be randomly selected. My basic idea was to do math.random(2) == 1 then drawing bricks using for loop but the problem is that it gets updated/drawn at every second and the bricks keeps on flickering/moving. I just want to randomly(only randomly select the y co-ordinate my x co-ordinate is fixed) to draw it once when you execute the code but its keep on flickering</p>
  <p>The issue I'm facing - <a href="https://youtu.be/AJB5vH7yfHc" rel="nofollow noreferrer">https://youtu.be/AJB5vH7yfHc</a></p>
  <p>My code</p>
  <pre><code>    for y = 0, VIRTUAL_HEIGHT- 4, 10 do
          if math.random(2) == 1 then
              love.graphics.rectangle('line', VIRTUAL_WIDTH - 10, y, 5, 10)
          end
      end
  </code></pre>