Purpose: In one hour, take a person without any knowledge and show them the basics.
- Basics - Add one command
- Basics - Add multiple commands
- Loops - Why we need loops
- Loops - Simple loop
- Loops - Complex loop
- Conditionals - Simple conditional
- Conditionals - Complex conditional
- Functions - Why we need functions <-- not sure
- Functions - Simple function <-- not sure
- Functions - Two functions <-- not sure
- Events - Simple event
- Events - Multiple events
- Free play
Explain about the screen layout, show how to add a command and how to run the code.
Story: TBD. Knight just needs to move 2 steps for some reason.
Blocks:
knight.move(up|down|left|right)
playSound(grunt)
Workspace:
on start {
knight.move(right)
}
Solution:
on start {
knight.move(right)
knight.move(right)
}
Story: TBD. Knight moves again, just a little more complex path. Maybe take some item and introduce inventory.
Blocks:
knight.move(up|down|left|right)
playSound(grunt)
Workspace:
on start {
}
Solution:
on start {
knight.move(down)
knight.move(right)
knight.move(right)
}
Story: TBD. Knight needs to travel further and hit something? Many repeated actions and a slash at the end.
Blocks:
knight.move(up|down|left|right)
knight.slash
playSound(grunt)
Workspace:
on start {
}
Solution:
on start {
knight.move(up)
knight.move(up)
knight.move(up)
knight.move(up)
knight.move(up)
knight.move(up)
knight.move(up)
knight.slash
}
Explain about loops and how they save us from extra work.
Story: TBD. Knight is doing a repeated action.
Blocks:
knight.move(up|down|left|right)
knight.slash
playSound(grunt)
repeat(1 time|2 times|3 times|4 times|5 times|6 times|7 times|8 times|9 times |10 times|forever) {}
Workspace:
on start {
repeat(5 times) {
}
}
Solution:
on start {
repeat(5 times) {
knight.move(right)
knight.move(down)
}
}
on start {
repeat(5 times) {
knight.move(right)
}
repeat(5 times) {
knight.move(down)
}
}
Extra: Can you solve this with one repeat statement instead of two.