Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save libraryaddict/658511702b6e6f6aafd6b104a1036ab8 to your computer and use it in GitHub Desktop.
Save libraryaddict/658511702b6e6f6aafd6b104a1036ab8 to your computer and use it in GitHub Desktop.
if (UtilMath.r(100 + _random.size()) > 100)
{
Pair<Integer, Integer> pair = UtilMath.rm(_random);
x = pair.getKey();
z = pair.getValue();
_random.remove(0);
}
else
{
x = UtilMath.r(getData().getMinX(), getData().getMaxX());
z = UtilMath.r(getData().getMinZ(), getData().getMaxZ());
_random.add(Pair.of(x, z));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment