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

@ -125,7 +125,7 @@ input.onPinPressed(TouchPin.P0, () => {
basic.clearScreen()
running = false
false_start = false
basic.pause(1000 + Math.random(2000))
basic.pause(1000 + Math.randomInt(2000))
})
input.onPinPressed(TouchPin.P1, () => {
@ -155,13 +155,13 @@ input.onPinPressed(TouchPin.P0, () => {
basic.clearScreen()
running = false
false_start = false
basic.pause(1000 + Math.random(2000))
basic.pause(1000 + Math.randomInt(2000))
if (!(false_start)) {
start = input.runningTime()
running = true
led.stopAnimation()
basic.clearScreen()
led.plot(Math.random(5), Math.random(5))
led.plot(Math.randomInt(5), Math.randomInt(5))
}
})
running = false
@ -214,13 +214,13 @@ input.onPinPressed(TouchPin.P0, () => {
basic.clearScreen()
running = false
false_start = false
basic.pause(1000 + Math.random(2000))
basic.pause(1000 + Math.randomInt(2000))
if (!(false_start)) {
start = input.runningTime()
running = true
led.stopAnimation()
basic.clearScreen()
led.plot(Math.random(5), Math.random(5))
led.plot(Math.randomInt(5), Math.randomInt(5))
}
})
running = false
@ -247,13 +247,13 @@ input.onPinPressed(TouchPin.P0, () => {
basic.clearScreen()
running = false
false_start = false
basic.pause(1000 + Math.random(2000))
basic.pause(1000 + Math.randomInt(2000))
if (!(false_start)) {
start = input.runningTime()
running = true
led.stopAnimation()
basic.clearScreen()
led.plot(Math.random(5), Math.random(5))
led.plot(Math.randomInt(5), Math.randomInt(5))
}
})
input.onPinPressed(TouchPin.P1, () => {