Fix randomInt

This commit is contained in:
Sam El-Husseini
2018-06-01 11:42:38 -07:00
parent b5814709f8
commit 6f148c14e0
61 changed files with 152 additions and 158 deletions

View File

@ -8,7 +8,7 @@ Complete the following [guided tutorial](/lessons/dice-roll/activity), your code
```blocks
input.onGesture(Gesture.Shake, () => {
let roll = Math.randomInt(6);
let roll = Math.randomRange(0, 6);
if (roll == 5) {
basic.showLeds(`
. # . # .
@ -67,7 +67,7 @@ Modify the line of code with `pick random` so that only number 1-4 can appear on
```blocks
input.onGesture(Gesture.Shake, () => {
let roll = Math.randomInt(4);
let roll = Math.randomRange(0, 4);
if (roll == 5) {
basic.showLeds(`
. # . # .
@ -125,7 +125,7 @@ Let's make a trick dice! Modify the line of code with `pick random` so that only
```blocks
input.onGesture(Gesture.Shake, () => {
let roll = Math.randomInt(4) + 2;
let roll = Math.randomRange(0, 4) + 2;
if (roll == 5) {
basic.showLeds(`
. # . # .