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

@ -22,7 +22,7 @@ rock, paper, and scissors are the tools you use to challenge your friends!)
```blocks
let tool = 0;
input.onGesture(Gesture.Shake, () => {
tool = Math.random(3)
tool = Math.randomInt(3)
})
```
@ -36,7 +36,7 @@ check whether ``tool`` is equal to ``0``.
```blocks
let tool = 0;
input.onGesture(Gesture.Shake, () => {
let tool = Math.random(3)
let tool = Math.randomInt(3)
if (tool == 0) {
}
})
@ -50,7 +50,7 @@ picture of a piece of paper.
```blocks
let tool = 0;
input.onGesture(Gesture.Shake, () => {
let tool = Math.random(3)
let tool = Math.randomInt(3)
if (tool == 0) {
basic.showLeds(`
# # # # #
@ -73,7 +73,7 @@ Click on the gearwheel icon to open up the ``if`` editor; then drag and drop an
```blocks
let tool = 0;
input.onGesture(Gesture.Shake, () => {
let tool = Math.random(3)
let tool = Math.randomInt(3)
if (tool == 0) {
basic.showLeds(`
# # # # #
@ -94,7 +94,7 @@ Place a ``||basic:show leds||`` block under the else if and draw a **rock** imag
```blocks
let tool = 0;
input.onGesture(Gesture.Shake, () => {
let tool = Math.random(3)
let tool = Math.randomInt(3)
if (tool == 0) {
basic.showLeds(`
# # # # #
@ -125,7 +125,7 @@ That's why you can use an ``else`` instead of an ``else if``.
```blocks
let tool = 0;
input.onGesture(Gesture.Shake, () => {
let tool = Math.random(3)
let tool = Math.randomInt(3)
if (tool == 0) {
basic.showLeds(`
# # # # #