Fix indentation of showLeds in a couple of projects.

This commit is contained in:
Sam El-Husseini 2016-10-13 11:32:25 -07:00
parent c817f9e3ff
commit b0392da8b1
2 changed files with 77 additions and 65 deletions

View File

@ -7,11 +7,12 @@
```sim ```sim
basic.forever(() => { basic.forever(() => {
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
# # # # # # # # # #
# # # # # # # # # #
. # # # . . # # # .
. . # . .`); . . # . .`
);
basic.pause(500); basic.pause(500);
basic.clearScreen(); basic.clearScreen();
basic.pause(500); basic.pause(500);
@ -29,11 +30,12 @@ Use [show leds](/reference/basic/show-leds) and make your code look like this:
```blocks ```blocks
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
# # # # # # # # # #
# # # # # # # # # #
. # # # . . # # # .
. . # . .`); . . # . .`
);
``` ```
## Step 2 ## Step 2
@ -42,11 +44,11 @@ Add a [pause](/reference/basic/pause) to wait and [clear screen](/reference/basi
```blocks ```blocks
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
# # # # # # # # # #
# # # # # # # # # #
. # # # . . # # # .
. . # . .`); . . # . .`);
basic.pause(500); basic.pause(500);
basic.clearScreen(); basic.clearScreen();
``` ```
@ -58,11 +60,12 @@ Put a [forever loop](/reference/basic/forever) around it.
```blocks ```blocks
basic.forever(() => { basic.forever(() => {
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
# # # # # # # # # #
# # # # # # # # # #
. # # # . . # # # .
. . # . .`); . . # . .`
);
basic.pause(500); basic.pause(500);
basic.clearScreen(); basic.clearScreen();
}) })
@ -75,11 +78,12 @@ Add a [pause](/reference/basic/pause) to wait after clearing the screen.
```blocks ```blocks
basic.forever(() => { basic.forever(() => {
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
# # # # # # # # # #
# # # # # # # # # #
. # # # . . # # # .
. . # . .`); . . # . .`
);
basic.pause(500); basic.pause(500);
basic.clearScreen(); basic.clearScreen();
basic.pause(500); basic.pause(500);
@ -94,20 +98,22 @@ Add a second image of a broken heart.
```blocks ```blocks
basic.forever(() => { basic.forever(() => {
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
# # # # # # # # # #
# # # # # # # # # #
. # # # . . # # # .
. . # . .`); . . # . .`
);
basic.pause(500); basic.pause(500);
basic.clearScreen(); basic.clearScreen();
basic.pause(500); basic.pause(500);
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
# . # # # # . # # #
# . . . # # . . . #
. # # # . . # # # .
. . # . .`); . . # . .`
);
basic.pause(500); basic.pause(500);
basic.clearScreen(); basic.clearScreen();
basic.pause(500); basic.pause(500);

View File

@ -10,11 +10,12 @@ Use [show leds](/reference/basic/show-leds) to make a smiley face:
```blocks ```blocks
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
. # . # . . # . # .
. . . . . . . . . .
# . . . # # . . . #
. # # # .`); . # # # .`
);
``` ```
## Step 2 ## Step 2
@ -24,18 +25,20 @@ frowny face inside it:
```blocks ```blocks
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
. # . # . . # . # .
. . . . . . . . . .
# . . . # # . . . #
. # # # .`); . # # # .`
);
input.onButtonPressed(Button.A, () => { input.onButtonPressed(Button.A, () => {
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
. # . # . . # . # .
. . . . . . . . . .
. # # # . . # # # .
# . . . #`); # . . . #`
);
}); });
``` ```
@ -45,18 +48,20 @@ Now add blocks so that when [button B is pressed](/reference/input/button-is-pre
```blocks ```blocks
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
. # . # . . # . # .
. . . . . . . . . .
# . . . # # . . . #
. # # # .`); . # # # .`
);
input.onButtonPressed(Button.A, () => { input.onButtonPressed(Button.A, () => {
basic.showLeds(` basic.showLeds(`
. # . # . . # . # .
. # . # . . # . # .
. . . . . . . . . .
. # # # . . # # # .
# . . . #`); # . . . #`
);
}); });
input.onButtonPressed(Button.B, () => { input.onButtonPressed(Button.B, () => {
basic.showLeds(` basic.showLeds(`
@ -64,6 +69,7 @@ input.onButtonPressed(Button.B, () => {
. # . # . . # . # .
. . . . . . . . . .
# . . . # # . . . #
. # # # .`); . # # # .`
);
}); });
``` ```