summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--utils/board.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/board.js b/utils/board.js
index ba43c45..72c7951 100644
--- a/utils/board.js
+++ b/utils/board.js
@@ -41,8 +41,7 @@ export function pickLetters(bag, count) {
}
let ret = [];
for (let i=0; i<count; i++) {
- let n = Math.floor(Math.random() * bag.remaining) -1;
- console.log(n);
+ let n = Math.floor(Math.random() * bag.remaining);
let j = 0;
for (;;) {
if (bag.letters[allLetters[j]].count === 0) {
@@ -55,8 +54,8 @@ export function pickLetters(bag, count) {
break;
}
}
- console.log("j:", j);
bag.letters[allLetters[j]].count--;
+ bag.remaining--;
ret.push(allLetters[j]);
}
return ret;