rename micro:bit to @boardname@

This commit is contained in:
Peli de Halleux
2016-11-01 17:44:37 -07:00
parent 9bc1e38345
commit 89406330cf
226 changed files with 697 additions and 750 deletions

View File

@ -8,7 +8,7 @@ Welcome! This guide will show you how to complete the challenges for the game of
### Step 16
Awesome! You have just created your game of rock paper scissors. However, why don't we add a little more to it? We can keep track of your score against the micro:bit using global variables. Create a global variable to keep track of the wins against the micro:bit. To do so, click on `add new`, then `Data`, and then `Number`.
Awesome! You have just created your game of rock paper scissors. However, why don't we add a little more to it? We can keep track of your score against the @boardname@ using global variables. Create a global variable to keep track of the wins against the @boardname@. To do so, click on `add new`, then `Data`, and then `Number`.
```
var wins: number = 0
@ -16,7 +16,7 @@ var wins: number = 0
### Step 17
At the beginning of the game, you don't have any wins against the micro:bit. As a result, let's set the `data->wins` variable to 0 at the top of your main function.
At the beginning of the game, you don't have any wins against the @boardname@. As a result, let's set the `data->wins` variable to 0 at the top of your main function.
```
wins = 0 // ***
@ -78,7 +78,7 @@ input.onButtonPressed(Button.A, () => {
### Step 20
You have tracked the number of wins you have against the micro:bit. However, how will you ever know how many wins you have? After we increment `data->wins`, let's display the total number of wins you have.
You have tracked the number of wins you have against the @boardname@. However, how will you ever know how many wins you have? After we increment `data->wins`, let's display the total number of wins you have.
```
wins = 0
@ -100,13 +100,13 @@ input.onButtonPressed(Button.A, () => {
})
```
* Tap `run` to run the program on the simulator. Notice the number of wins you have against the micro:bit.
* Tap `run` to run the program on the simulator. Notice the number of wins you have against the @boardname@.
## Challenge 2
### Step 21
You have managed to keep score of the number of wins you have against the micro:bit. However, what about losses? Let's begin by creating another global variable to keep track of losses.
You have managed to keep score of the number of wins you have against the @boardname@. However, what about losses? Let's begin by creating another global variable to keep track of losses.
```
var losses: number = 0
@ -114,7 +114,7 @@ var losses: number = 0
### Step 22
Add a condition for when button `B` is pressed. When this occurs, we will increment your losses against the micro:bit by 1. Let's hope that this button will not be pressed too often!
Add a condition for when button `B` is pressed. When this occurs, we will increment your losses against the @boardname@ by 1. Let's hope that this button will not be pressed too often!
```
wins = 0
@ -167,7 +167,7 @@ input.onButtonPressed(Button.B, () => {
### Step 24
Let's also display the score when button `B` is pressed, just as we have done for button `A`. This will help us keep track of the number of wins and losses you have against the micro:bit.
Let's also display the score when button `B` is pressed, just as we have done for button `A`. This will help us keep track of the number of wins and losses you have against the @boardname@.
```
wins = 0
@ -198,7 +198,7 @@ input.onButtonPressed(Button.B, () => {
### Step 25
You have managed to keep track of both the wins and losses you have against the micro:bit! But did you notice that you haven't updated something? Take a look at condition of `input->on button pressed("A")`.
You have managed to keep track of both the wins and losses you have against the @boardname@! But did you notice that you haven't updated something? Take a look at condition of `input->on button pressed("A")`.
```
wins = 0
@ -229,7 +229,7 @@ input.onButtonPressed(Button.B, () => {
})
```
* Tap the `run` button to run your game on the simulator. See if you can get more wins than the micro:bit can!
* Tap the `run` button to run your game on the simulator. See if you can get more wins than the @boardname@ can!
Congratulations! You have successfully created a fully functional game of rock, paper, scissors against the micro:bit. Challenge your friends to see who can get a better score against the micro:bit.
Congratulations! You have successfully created a fully functional game of rock, paper, scissors against the @boardname@. Challenge your friends to see who can get a better score against the @boardname@.