Change docs to randomInt

This commit is contained in:
Sam El-Husseini
2018-04-21 10:52:09 -07:00
parent 99a28e59f1
commit 6b9e78d269
61 changed files with 152 additions and 152 deletions

View File

@ -21,7 +21,7 @@ We need to show a random value from 1 to 6 on our dice. So let's make a local va
```blocks
input.onGesture(Gesture.Shake, () => {
let roll = Math.random(6)
let roll = Math.randomInt(6)
})
```
@ -30,7 +30,7 @@ We need a condition for if **roll** is 5. We will show a `6` if **roll** is 5 be
```blocks
input.onGesture(Gesture.Shake, () => {
let roll = Math.random(6);
let roll = Math.randomInt(6);
if (roll == 5) {
basic.showLeds(`
. # . # .
@ -48,7 +48,7 @@ Let's use an `else if` condition for if **roll** is 4. If **roll** is 4 we can s
```blocks
input.onGesture(Gesture.Shake, ()=> {
let roll = Math.random(6);
let roll = Math.randomInt(6);
if (roll == 5) {
basic.showLeds(`
. # . # .
@ -75,7 +75,7 @@ Now we need to repeat the same steps for if **roll** is 3. If **roll** is 3 we w
```blocks
input.onGesture(Gesture.Shake, () => {
let roll = Math.random(6);
let roll = Math.randomInt(6);
if (roll == 5) {
basic.showLeds(`
. # . # .
@ -108,7 +108,7 @@ Let's also repeat these steps to show the 3, 2, and 1 on the dice. We are almost
```blocks
input.onGesture(Gesture.Shake, () => {
let roll = Math.random(6);
let roll = Math.randomInt(6);
if (roll == 5) {
basic.showLeds(`
. # . # .