From 1164feb7542e8aabff0dde4e4021fecefd2ddf6c Mon Sep 17 00:00:00 2001 From: Thomas Denney Date: Tue, 9 Aug 2016 16:55:43 +0100 Subject: [PATCH] More snippet types --- docs/lessons/bop-it/activity.md | 2 +- docs/lessons/headbands/quiz.md | 2 +- docs/reference/images/plot-frame.md | 4 ++-- docs/reference/images/plot-image.md | 4 ++-- docs/reference/images/set-pixel.md | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/lessons/bop-it/activity.md b/docs/lessons/bop-it/activity.md index 0f9fca6e..75f932a3 100644 --- a/docs/lessons/bop-it/activity.md +++ b/docs/lessons/bop-it/activity.md @@ -62,7 +62,7 @@ export function newAction() { Now let's implement `PRESS PIN 0` in the main. Create a condition of `input->on pin pressed("P0")` that will add one to the score and calls the method `new action`. -``` +```blocks // **. . .** input.onButtonPressed(Button.B, () => { basic.showNumber(game.score(), 150) // *** diff --git a/docs/lessons/headbands/quiz.md b/docs/lessons/headbands/quiz.md index 93cad018..ebbfc8d0 100644 --- a/docs/lessons/headbands/quiz.md +++ b/docs/lessons/headbands/quiz.md @@ -39,7 +39,7 @@ coll.push("cat") ## 4. Write the five (5) lines of code that will add the following five words to `data->coll`: puppy, clock, night, cat, cow. -``` +```ts let coll = ([]) ``` diff --git a/docs/reference/images/plot-frame.md b/docs/reference/images/plot-frame.md index 06602a36..c4a2f580 100644 --- a/docs/reference/images/plot-frame.md +++ b/docs/reference/images/plot-frame.md @@ -6,7 +6,7 @@ Display an [Image](/reference/images/image) on the BBC micro:bit's [LED screen]( ### JavaScript -``` +```sig export function plotFrame(_this: micro_bit.Image, index: number) ``` @@ -20,7 +20,7 @@ The `plot frame` function takes the index of the frame (if there are two frames, ### Example -``` +```blocks let img = images.createImage(` # . . . # # . . . # . # . # . . # # # . diff --git a/docs/reference/images/plot-image.md b/docs/reference/images/plot-image.md index 5869b131..bddd000e 100644 --- a/docs/reference/images/plot-image.md +++ b/docs/reference/images/plot-image.md @@ -6,7 +6,7 @@ Display an [Image](/reference/images/image) on the BBC micro:bit's [LED screen]( ### JavaScript -``` +```sig export function plotImage(_this: micro_bit.Image, xOffset: number) ``` @@ -20,7 +20,7 @@ The `show image` function has a built in delay of 400ms after display of the ima ### Example -``` +```blocks let img = images.createImage(` # . . . # # . . . # . # . # . . # # # . diff --git a/docs/reference/images/set-pixel.md b/docs/reference/images/set-pixel.md index 0432f594..1be28eb5 100644 --- a/docs/reference/images/set-pixel.md +++ b/docs/reference/images/set-pixel.md @@ -6,7 +6,7 @@ Set the on/off state of pixel in an [Image](/reference/images/image). ### JavaScript -``` +```sig export function setPixel(_this: micro_bit.Image, x: number, y: number, value: boolean) ``` @@ -24,7 +24,7 @@ To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen). The following example creates an image and stores it in the `img` variable. The `set pixel` function sets the centre pixel off, before `img` is shown using `show image`. -``` +```blocks let img = images.createImage(` . . # . . . # . # .