From 1e436f4e719b051ad9a7b70d588da7cbdda80bad Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 1 Jun 2016 21:19:16 -0700 Subject: [PATCH] more docs updates --- docs/device/contents.md | 2 +- docs/device/error-codes.md | 2 +- docs/device/reactive.md | 2 +- docs/lessons/blocks-conditions.md | 2 +- docs/lessons/bop-it/activity.md | 2 +- docs/lessons/challenges.md | 2 +- docs/lessons/game-of-chance.md | 2 +- docs/lessons/graphics.md | 2 +- docs/lessons/loops.md | 2 +- docs/lessons/night-light/offset-image/activity.md | 2 +- docs/lessons/prank-wifi.md | 4 +--- docs/lessons/prank-wifi/activity.md | 2 +- docs/lessons/rock-paper-scissors.md | 4 +--- docs/lessons/rotation-animation.md | 2 +- docs/lessons/screen-wipe.md | 4 +--- docs/lessons/smiley.md | 4 +--- docs/lessons/speed-button/activity.md | 2 +- docs/lessons/variables.md | 2 +- docs/reference/game/game-library.md | 10 +--------- docs/reference/game/score.md | 12 +----------- docs/reference/game/start-countdown.md | 2 -- olddocs/js/events.md | 2 -- olddocs/js/game-library.md | 2 -- olddocs/js/game-library/add-point-to-score.md | 12 +----------- olddocs/js/game-library/change-score-by.md | 14 +------------- olddocs/js/game-library/game-over.md | 14 +------------- 26 files changed, 23 insertions(+), 89 deletions(-) diff --git a/docs/device/contents.md b/docs/device/contents.md index 008b1820..2561a694 100644 --- a/docs/device/contents.md +++ b/docs/device/contents.md @@ -1,6 +1,6 @@ # micro:bit - the device -The micro:bit device #docs +The micro:bit device The micro:bit is a very capable device with many components: diff --git a/docs/device/error-codes.md b/docs/device/error-codes.md index d640d2b8..b75d7759 100644 --- a/docs/device/error-codes.md +++ b/docs/device/error-codes.md @@ -1,6 +1,6 @@ # Error codes -The micro:bit error codes #docs +The micro:bit error codes Your micro:bit may encounter a situation that prevents it from running your code. When this happens, a frowny face will appear on your micro:bit screen (see picture) followed by an error number. diff --git a/docs/device/reactive.md b/docs/device/reactive.md index 6a71076c..732377a2 100644 --- a/docs/device/reactive.md +++ b/docs/device/reactive.md @@ -1,6 +1,6 @@ # The micro:bit - a reactive system -The micro:bit is a reactive system. #docs +The micro:bit is a reactive system. ### Computing systems diff --git a/docs/lessons/blocks-conditions.md b/docs/lessons/blocks-conditions.md index 6b01609a..a158926c 100644 --- a/docs/lessons/blocks-conditions.md +++ b/docs/lessons/blocks-conditions.md @@ -1,6 +1,6 @@ # blocks - if statements -An introduction to conditions for the Block Editor. #docs +An introduction to conditions for the Block Editor. ## Introduction to conditions diff --git a/docs/lessons/bop-it/activity.md b/docs/lessons/bop-it/activity.md index 4f36a9bb..93d849bf 100644 --- a/docs/lessons/bop-it/activity.md +++ b/docs/lessons/bop-it/activity.md @@ -1,6 +1,6 @@ # bop it challenges -a game similar to "Simon Says" with the BBC micro:bit. #docs +a game similar to "Simon Says" with the BBC micro:bit. ## Before we get started diff --git a/docs/lessons/challenges.md b/docs/lessons/challenges.md index 27fd0519..dc280585 100644 --- a/docs/lessons/challenges.md +++ b/docs/lessons/challenges.md @@ -1,6 +1,6 @@ # blocks - challenges -Extra stuff for the Block Editor - an introduction to GPIO #docs +Extra stuff for the Block Editor - an introduction to GPIO ## Before we get started diff --git a/docs/lessons/game-of-chance.md b/docs/lessons/game-of-chance.md index b16c57a3..52f88d64 100644 --- a/docs/lessons/game-of-chance.md +++ b/docs/lessons/game-of-chance.md @@ -1,6 +1,6 @@ # game of chance blocks lesson -create an answering machine on the BBC micro:bit #docs +create an answering machine on the BBC micro:bit ## Topic diff --git a/docs/lessons/graphics.md b/docs/lessons/graphics.md index 035e938e..0f9f32b8 100644 --- a/docs/lessons/graphics.md +++ b/docs/lessons/graphics.md @@ -1,6 +1,6 @@ # blocks - rendering graphics -An introduction to graphics for the Block Editor. #docs +An introduction to graphics for the Block Editor. ## Before we get started diff --git a/docs/lessons/loops.md b/docs/lessons/loops.md index 8a112281..0ed94244 100644 --- a/docs/lessons/loops.md +++ b/docs/lessons/loops.md @@ -1,6 +1,6 @@ # blocks - loops -An introduction to Loops for the Block Editor. #docs +An introduction to Loops for the Block Editor. We may want to handle the user’s input multiple times or remain waiting for their input for a long time. We use loops to make sure that our code runs multiple times. These can be found in the **Loops** drawer. diff --git a/docs/lessons/night-light/offset-image/activity.md b/docs/lessons/night-light/offset-image/activity.md index de48f831..6dab515e 100644 --- a/docs/lessons/night-light/offset-image/activity.md +++ b/docs/lessons/night-light/offset-image/activity.md @@ -1,6 +1,6 @@ # offset image challenges -Coding challenges for the offset image tutorial. #docs +Coding challenges for the offset image tutorial. ## Before we get started diff --git a/docs/lessons/prank-wifi.md b/docs/lessons/prank-wifi.md index 174786f6..633305ee 100644 --- a/docs/lessons/prank-wifi.md +++ b/docs/lessons/prank-wifi.md @@ -1,8 +1,6 @@ # prank wifi lesson -create a fake wifi app to trick your friends. - -create a fake wifi app to trick your friends +Create a fake wifi app to trick your friends * [activity](/lessons/prank-wifi/activity) * [quiz](/lessons/prank-wifi/quiz) diff --git a/docs/lessons/prank-wifi/activity.md b/docs/lessons/prank-wifi/activity.md index 001a896d..8530bd0e 100644 --- a/docs/lessons/prank-wifi/activity.md +++ b/docs/lessons/prank-wifi/activity.md @@ -1,6 +1,6 @@ # prank wifi challenges -create a fake wifi app to trick your friends. #docs +create a fake wifi app to trick your friends. ## Before we get started diff --git a/docs/lessons/rock-paper-scissors.md b/docs/lessons/rock-paper-scissors.md index 97ba0239..8b7503f5 100644 --- a/docs/lessons/rock-paper-scissors.md +++ b/docs/lessons/rock-paper-scissors.md @@ -1,8 +1,6 @@ # rock paper scissors lesson -a game against the BBC micro:bit. - - +A game against the BBC micro:bit. ## Topic diff --git a/docs/lessons/rotation-animation.md b/docs/lessons/rotation-animation.md index 058d1805..a6afdec0 100644 --- a/docs/lessons/rotation-animation.md +++ b/docs/lessons/rotation-animation.md @@ -20,6 +20,7 @@ Learn how to create images that look like a rotating animation by using a while ## Documentation ```cards +while (true) {} let x = 0 input.onButtonPressed(Button.A, () => {}) basic.showLeds(` @@ -30,7 +31,6 @@ basic.showLeds(` . . . . . `) basic.pause(100) -while (true) {} ``` ## Objectives diff --git a/docs/lessons/screen-wipe.md b/docs/lessons/screen-wipe.md index 02905d16..e697c30b 100644 --- a/docs/lessons/screen-wipe.md +++ b/docs/lessons/screen-wipe.md @@ -1,8 +1,6 @@ # screen wipe blocks lesson -clear the screen by pressing button "A". - - +Clear the screen by pressing button "A". ## Topic diff --git a/docs/lessons/smiley.md b/docs/lessons/smiley.md index f5b611b2..a0945d0b 100644 --- a/docs/lessons/smiley.md +++ b/docs/lessons/smiley.md @@ -1,8 +1,6 @@ # smiley blocks lesson -design a blinking image lesson #docs - - +Design a blinking image lesson ## Topic diff --git a/docs/lessons/speed-button/activity.md b/docs/lessons/speed-button/activity.md index 810f20f7..a6fbaaf6 100644 --- a/docs/lessons/speed-button/activity.md +++ b/docs/lessons/speed-button/activity.md @@ -1,6 +1,6 @@ # speed button challenges -Coding challenges for the speed button tutorial. #docs +Coding challenges for the speed button tutorial. ## Before we get started diff --git a/docs/lessons/variables.md b/docs/lessons/variables.md index ac4c0607..8b6dd215 100644 --- a/docs/lessons/variables.md +++ b/docs/lessons/variables.md @@ -1,6 +1,6 @@ # Blocks - Variables -An introduction to variables for the Block Editor. #docs +An introduction to variables for the Block Editor. ## What is a variable? diff --git a/docs/reference/game/game-library.md b/docs/reference/game/game-library.md index 2059a3d5..97285892 100644 --- a/docs/reference/game/game-library.md +++ b/docs/reference/game/game-library.md @@ -1,18 +1,10 @@ # Game Library -The game library #docs - The game library supports simple single-player time-based games. The player has a **sprite**, number of **lives** and a **score**. The game has a sprite, number of **levels** and a **countdown clock**. The general goal of a game will be to move the sprite and achieve a top score before time runs out or the number of lives goes to zero. -## Block Editor - -![](/static/mb/game-library/pic0.png) - -## KindScript - The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds. -``` +```blocks input.onButtonPressed(Button.A, () => { game.addScore(1) }) diff --git a/docs/reference/game/score.md b/docs/reference/game/score.md index f00a4662..366018ff 100644 --- a/docs/reference/game/score.md +++ b/docs/reference/game/score.md @@ -1,20 +1,10 @@ # Score -The game library #docs - The game library supports simple single-player games. The player has a **score**. -## Block Editor - -The code below shows a simple game where the user gets to press the button ``A`` and adds 1 point to score that will be displayed on the BBC micro:bit screen - -![](/static/mb/game-library/add-point-to-score-0.png) - -## KindScript - The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds. -``` +```blocks input.onButtonPressed(Button.A, () => { game.addScore(1) }) diff --git a/docs/reference/game/start-countdown.md b/docs/reference/game/start-countdown.md index 07eeeedd..19671e3d 100644 --- a/docs/reference/game/start-countdown.md +++ b/docs/reference/game/start-countdown.md @@ -1,7 +1,5 @@ # Start Countdown -The game library #docs - The game library supports simple single-player time-based games. The general goal of a game will be to achieve a top score before time runs out of time. ## Block Editor diff --git a/olddocs/js/events.md b/olddocs/js/events.md index 3337ae20..bdabc82e 100644 --- a/olddocs/js/events.md +++ b/olddocs/js/events.md @@ -1,7 +1,5 @@ # Events Library -The events library #docs - The functions in the events namespace allow the BBC micro:bit to communicate with a separate (remote) device, such as a smartphone, over Bluetooth (Smart). The set of supported events will depend on the remote device and the BBC micro:bit apps available for the remote device. The events accessible from Touch Develop are listed below. ### Remote control diff --git a/olddocs/js/game-library.md b/olddocs/js/game-library.md index ecb1b5c0..3b3fca02 100644 --- a/olddocs/js/game-library.md +++ b/olddocs/js/game-library.md @@ -1,7 +1,5 @@ # Game Library -The game library #docs - The game library supports simple single-player time-based games. The player has a number of **lives** and a **score**. The game has a number of **levels** and a **countdown clock**. The general goal of a game will be to achieve a top score before time runs out or the number of lives goes to zero. ## Touch Develop diff --git a/olddocs/js/game-library/add-point-to-score.md b/olddocs/js/game-library/add-point-to-score.md index d90ccc53..fba67cf5 100644 --- a/olddocs/js/game-library/add-point-to-score.md +++ b/olddocs/js/game-library/add-point-to-score.md @@ -1,20 +1,10 @@ # Add Points to Score -The game library #docs - The game library supports simple single-player time-based games. The player will ** add points to score**. -## Block Editor - -The code below shows a simple game where the user gets to press the button ``A`` as much times as possible and the score will display on the screen. - -![](/static/mb/game-library/add-point-to-score-0.png) - -## Touch Develop - The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds. -``` +```blocks input.onButtonPressed(Button.A, () => { game.addScore(1) }) diff --git a/olddocs/js/game-library/change-score-by.md b/olddocs/js/game-library/change-score-by.md index 514e11dc..d5d1b7ac 100644 --- a/olddocs/js/game-library/change-score-by.md +++ b/olddocs/js/game-library/change-score-by.md @@ -1,20 +1,8 @@ # Change Score By -The game library #docs - The game library supports simple single-player time-based games. The player will ** add points to score**. -## Block Editor - -The code below shows a simple game where the user gets to press the button ``A`` as much times as possible and the score will display on the screen. - -![](/static/mb/change-score-by-0.png) - -## Touch Develop - -The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds. - -``` +```blocks input.onButtonPressed(Button.A, () => { game.addScore(1) }) diff --git a/olddocs/js/game-library/game-over.md b/olddocs/js/game-library/game-over.md index 755861d7..63172672 100644 --- a/olddocs/js/game-library/game-over.md +++ b/olddocs/js/game-library/game-over.md @@ -1,20 +1,8 @@ # Game Over -The game library #docs - -The game library supports simple single-player time-based games. The game can end the game by calling the `game over` function - -## Block Editor - -You can end the game by calling the `game over ` function. In this example, if BBC micro:bit's answer to the question is GAME OVER, GAME OVER will be displayed to end the game. - -![](/static/mb/game-library/game-over-0.png) - -## Touch Develop - You can end the game by calling the `game -> game over` function: -``` +```blocks game.gameOver() ```