-
-
Save xvaldetaro/c1b4c3c62b2607cc8363 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pickSome(z) { | |
var bool = false; | |
var i = 0 | |
while (bool == false) { | |
i++; | |
y = z[Math.floor(Math.random() * z.length)]; | |
if (i > 500) { | |
z = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]; | |
console.log("500 tries already. Allowing any skills."); | |
} | |
if (skLearn[y] != true) { | |
skLearn[y] = true; | |
bool = true; | |
return y; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment