2016-03-26 00:47:20 +01:00
|
|
|
# snowflake fall blocks challenges
|
|
|
|
|
|
|
|
Coding challenges for snowflake fall.
|
|
|
|
|
|
|
|
## Before we get started
|
|
|
|
|
2016-04-13 17:27:45 +02:00
|
|
|
Complete the [snowflake fall](/lessons/snowflake-fall/activity) activity and your code will look like this:
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2016-03-31 00:11:05 +02:00
|
|
|
```blocks
|
|
|
|
basic.forever(() => {
|
|
|
|
basic.showLeds(`
|
|
|
|
. . . . .
|
|
|
|
. . # . .
|
|
|
|
. # # # .
|
|
|
|
. . # . .
|
|
|
|
. . . . .
|
|
|
|
`)
|
|
|
|
basic.showLeds(`
|
|
|
|
. . # . .
|
|
|
|
. # . # .
|
|
|
|
# . . . #
|
|
|
|
. # . # .
|
|
|
|
. . # . .
|
|
|
|
`)
|
|
|
|
})
|
|
|
|
```
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
### Challenge 1
|
|
|
|
|
2016-05-27 00:24:10 +02:00
|
|
|
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
To finalize our snowflake fall, let's add a different snowflake pattern.
|
|
|
|
|
2016-03-31 00:11:05 +02:00
|
|
|
```blocks
|
|
|
|
|
|
|
|
basic.forever(() => {
|
|
|
|
basic.showLeds(`
|
|
|
|
. . . . .
|
|
|
|
. . # . .
|
|
|
|
. # # # .
|
|
|
|
. . # . .
|
|
|
|
. . . . .
|
|
|
|
`)
|
|
|
|
basic.showLeds(`
|
|
|
|
. . # . .
|
|
|
|
. # . # .
|
|
|
|
# . . . #
|
|
|
|
. # . # .
|
|
|
|
. . # . .
|
|
|
|
`)
|
|
|
|
basic.showLeds(`
|
|
|
|
. # . # .
|
|
|
|
# # # # #
|
|
|
|
. # . # .
|
|
|
|
# # # # #
|
|
|
|
. # . # .
|
|
|
|
`)
|
|
|
|
})
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
* Run your program and see if it works.
|
|
|
|
|
|
|
|
### Challenge 3
|
|
|
|
|
|
|
|
Add a fourth frame to the current animation... or make it your own!
|
|
|
|
|