2016-03-26 00:47:20 +01:00
|
|
|
# magic logo challenges
|
|
|
|
|
|
|
|
Coding challenges for the magic logo tutorial. #docs
|
|
|
|
|
|
|
|
## Before we get started
|
|
|
|
|
2016-04-13 17:27:45 +02:00
|
|
|
Complete the [magic logo](/lessons/magic-logo/activity) activity and your code will look like this:
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
input.onLogoUp(() => {
|
|
|
|
basic.plotImage(`
|
|
|
|
. . # . .
|
|
|
|
. # # # .
|
|
|
|
# # # # #
|
|
|
|
. . # . .
|
|
|
|
. . # . .
|
|
|
|
`)
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
|
|
|
### Challenge 1
|
|
|
|
|
|
|
|
How about when the logo is down? We should display an arrow pointing downward!
|
|
|
|
|
|
|
|
### @video td/videos/magic-logo-1-2
|
|
|
|
|
|
|
|
```
|
|
|
|
input.onLogoUp(() => {
|
|
|
|
basic.plotImage(`
|
|
|
|
. . # . .
|
|
|
|
. # # # .
|
|
|
|
# # # # #
|
|
|
|
. . # . .
|
|
|
|
. . # . .
|
|
|
|
`)
|
|
|
|
})
|
|
|
|
input.onLogoDown(() => {
|
|
|
|
basic.plotImage(`
|
|
|
|
. . # . .
|
|
|
|
. . # . .
|
|
|
|
# # # # #
|
|
|
|
. # # # .
|
|
|
|
. . # . .
|
|
|
|
`) // ***
|
|
|
|
}) // ***
|
|
|
|
```
|
|
|
|
|
|
|
|
### Challenge 2
|
|
|
|
|
|
|
|
Use the `input->on screen up` event to show a spinning arrow when the screen is turned up.
|
|
|
|
|
|
|
|
### Challenge 3
|
|
|
|
|
|
|
|
Display another animation using the `input->on screen up` event.
|
|
|
|
|