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/spinner/activity), your code s
```blocks
input.onGesture(Gesture.Shake, () => {
let randomArrow = Math.randomInt(4)
let randomArrow = Math.randomRange(0, 4)
if (randomArrow == 3) {
basic.showLeds(`
. . # . .
@ -46,7 +46,7 @@ Modify the random number generator so that it can include new arrows we will cre
```blocks
input.onGesture(Gesture.Shake, () => {
let randomArrow = Math.randomInt(8)
let randomArrow = Math.randomRange(0, 8)
if (randomArrow == 3) {
basic.showLeds(`
. . # . .
@ -89,7 +89,7 @@ Let's add more arrows that point diagonally.
```blocks
input.onGesture(Gesture.Shake, () => {
let randomArrow = Math.randomInt(8)
let randomArrow = Math.randomRange(0, 8)
if (randomArrow == 7) {
basic.showLeds(`
. . # . .