October 2021
Intermediate to advanced
500 pages
16h 23m
English
In this chapter, you will learn how to define rules for when code should be executed.
This language feature is called control flow, and it allows you to describe the conditions for when specific portions of your program should run.
You will see the if/else statement and expression and the when expression, and you will learn how to write true/false tests using the comparison and logical operators.
To see these features in action, you will continue working in the bounty-board project, creating the quests that will be presented to the player. The quests will scale in difficulty as the player gets stronger, which is where conditionals will come into play.
Read now
Unlock full access