Skip to content

Commit

Permalink
Assigned weights to functions
Browse files Browse the repository at this point in the history
  • Loading branch information
v-chyou authored Nov 8, 2019
1 parent 1e1e557 commit 2ab021b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ namespace hourOfCode {
* Agent watches the monitor for hazards
*/
//% block="agent look for hazards"
//% weight=75
export function agentLookForHazards() {
monitorCount--
loops.pause(500)
Expand All @@ -239,6 +240,7 @@ namespace hourOfCode {
* Sees that there is a hazard on the monitor
*/
//% block="hazard found"
//% weight=74
export function agentSeeHazard() {
let hiddenTarget = positions.createWorld(-63, 68, -78)
let successBlock = Block.GoldBlock
Expand All @@ -249,6 +251,7 @@ namespace hourOfCode {
* Warns the team of a high-risk area
*/
//% block="alert team"
//% weight = 70
export function alertTeam() {
if (agentSeeHazard()) {
agent.attack(SixDirection.Up)
Expand Down

0 comments on commit 2ab021b

Please sign in to comment.