Get 2 unique numbers in a row?
<p>I want to make sure 'grid' can't return 2 same values, but I'm not sure how. Here's my code:</p>

<p><code>grid[rnd(2,x-2) * y + rnd(2,y-2)].height = rnd(25,40);</code></p>

<pre><code>int rnd(int min, int max) {
    return min + rand() % (max - min + 1);
}
</code></pre>

<p>I also seeded rand() with <code>srand(time(NULL));</code></p>

<p>I wish I could provide more details or what I tried, but I couldn't quite find anything related to this topic.</p>

<p>EDIT: I could of course do re-randoming, but I feel like it's bad practice :/</p>
