3 of 1 ·Game rules

Lesson 3 · Creative Coding
Turn conditions into win, lose and score rules.
Conditions
An if/else chooses between two actions. If the character touches the goal, show You win; otherwise keep playing. Point to the question and each action in a supplied example.
Click to zoomEvery game rule is a condition plus an action: if the player touches a coin, add 1 to score; if the player touches an enemy, game over.
3 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.