Deleted loop around event handlers in coin flipper

This commit is contained in:
Ron Hale-Evans 2016-06-07 11:44:42 -07:00
parent bd835a8a6e
commit 6de2f22542

View File

@ -234,7 +234,6 @@ Here are the blocks to make your coin flipper. When you press button
on the LED screen.
```blocks
basic.forever(() => {
input.onButtonPressed(Button.B, () => {
if (Math.randomBoolean()) {
basic.showString("H");
@ -242,14 +241,12 @@ basic.forever(() => {
basic.showString("T");
}
});
});
```
### ~hint
The ``pick random true or false`` block randomly tells the ``if``
block `true` or `false`. If the ``pick`` block
picked `true`, the ``if`` block shows the letter `H`. Otherwise, it
shows the letter `T`.
block `true` or `false`. If the ``pick`` block picked `true`, the
``if`` block shows the letter `H`. Otherwise, it shows the letter `T`.
That's it!
@ -280,7 +277,6 @@ show your score.
When you're done, your coin flipping program should look like this:
```blocks
basic.forever(() => {
input.onButtonPressed(Button.B, () => {
if (Math.randomBoolean()) {
basic.showString("H");
@ -294,7 +290,6 @@ basic.forever(() => {
input.onButtonPressed(Button.AB, () => {
basic.showNumber(game.score());
});
});
```
Flip until your thumbs get tired!