title: Generating random boolean
body: <p>I'm currently implementing <a href="http://www.neocomputer.org/projects/eller.html" rel="noreferrer">Eller's Algorithm</a> in C++ and a small detail is bothering me about the randomness of the maze.</p>
  
  <p>Until now I used the following code to generate a random <code>bool</code>:</p>
  
  <pre><code>bool randomBool()
  {
      return 0 + (rand() % (1 - 0 + 1)) == 1;
  }
  
  // In main.cpp
  
  time_t seconds;
  time(&amp;seconds);
  srand((unsigned int) seconds);
  </code></pre>
  
  <p>But upon debugging I often see repeated <code>true</code> or <code>false</code> being generated, sometimes up to 30 times in a row.</p>
  
  <p>Is this algorithm truly random or is there any better method in C++?</p>