Lessons fixes (#1609)

* fixing a bunch of lessons

* more fixes

* more fixes

* more cleanup

* Additional fixes
This commit is contained in:
Peli de Halleux
2018-11-09 15:36:46 -08:00
committed by GitHub
parent 2aa8d0cec6
commit 50367217f3
20 changed files with 75 additions and 91 deletions

View File

@ -21,7 +21,7 @@ let action = Math.randomRange(0, 3)
```blocks
let action = Math.randomRange(0, 3)
if (action == 0) {
basic.showString("PUSH A", 150)
basic.showString("PUSH A")
}
```
@ -41,14 +41,14 @@ input.onButtonPressed(Button.A, () => {
```blocks
let action = Math.randomRange(0, 3)
if (action == 1) {
basic.showString("LOGO DOWN", 150)
basic.showString("LOGO DOWN")
}
```
## 5. Write the code that increments the score if the @boardname@ logo is tilted down when the global variable called 'action' is equal to 1
```blocks
input.onLogoDown(() => {
input.onGesture(Gesture.LogoDown, function () {
let action = Math.randomRange(0, 3)
if (action == 1) {
game.addScore(1)
@ -61,14 +61,14 @@ input.onLogoDown(() => {
```blocks
let action = Math.randomRange(0, 3)
if (action == 2) {
basic.showString("SHAKE", 150)
basic.showString("SHAKE")
}
```
## 7. Write the code that increments the score if the @boardname@ is shaken when the global variable called 'action' is equal to 2
```blocks
input.onLogoDown(() => {
input.onGesture(Gesture.LogoDown, function () {
let action = Math.randomRange(0, 3)
if (action == 1) {
game.addScore(1)