Skip to content

Commit

Permalink
Update ball.md, custom.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
neonerz committed Oct 21, 2020
1 parent 7ddb6ae commit 7c4d62d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 38 deletions.
16 changes: 1 addition & 15 deletions ball.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,11 @@
# Get the ball

## Step 1
The old lady's elevator isn't working. It looks like the levers are stuck. Have the Agent use it's strength to flip all the levers so she can bring down the children's ball. ``||hoc2020:flipLever||``
The old lady's elevator isn't working. It looks like the levers are stuck. Have the Agent use it's strength to flip all the levers so she can bring down the children's ball.

```ghost
player.onChat("witch", function () {
agent.move(UP, 1)
hoc2020.flipLever()
agent.move(RIGHT, 3)
agent.move(UP, 2)
hoc2020.flipLever()
agent.move(LEFT, 3)
agent.move(UP, 1)
hoc2020.flipLever()
agent.move(RIGHT, 3)
agent.move(UP, 2)
hoc2020.flipLever()
})
```
```template
\\
```
```explicitHints
This is one flipLever test
Expand Down
34 changes: 11 additions & 23 deletions custom.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
// Add your code here

enum Direction {
//% block="forward"
Forward,
//% block="back"
Back,
//% block="left"
Left,
//% block="right"
Right
}
//% block="HOC 2020" weight=200 color=#00a513 icon=""
namespace hoc2020 {

/**
* Agent Interact Forward
*/
//% block="Flip Lever"
export function flipLever() {
agent.interact(FORWARD)
}

//% block="HOC 2020" weight=200 color=#00a513
namespace hoc2020 {

/**
* Agent Interact Forward
*/
//% block="Flip Lever"
export function flipLever() {
agent.interact(FORWARD)
}

}

0 comments on commit 7c4d62d

Please sign in to comment.