6.2.2 Creating a Variable
View
We start by defining the information we want the variable to hold. That will come from defining what you want to use the variable for and how you are going to use it. For example, we want to add a time limit to the game, by creating a variable that will start at a given number and then count down by 1 every second. When the number gets to zero, the time is up!
- What? We want to create a timer.
- For what? To set a time limit to the game where the time will start at a given number and decrement (decrease by 1) every second until it gets to zero.
Last modified: Friday, 22 October 2021, 11:42 AM