projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Complete FenUtil draft. Untested
[xogo.git]
/
utils
/
alea.js
diff --git
a/utils/alea.js
b/utils/alea.js
index
077970d
..
d892824
100644
(file)
--- a/
utils/alea.js
+++ b/
utils/alea.js
@@
-26,6
+26,10
@@
export const Random = {
return Math.floor(Random.rand() * (max - min)) + min;
},
+ randBool: function() {
+ return Random.randInt(0, 2) == 0;
+ },
+
// Inspired by https://github.com/jashkenas/underscore
sample: function(arr, n) {
n = n || 1;