mrbrenlea

mrbrenlea

Wednesday, September 30, 2015

If that then or else

This week in EDTECH597 we explored a basic concept of coding that can help make life a lot easier; the if that then or else.  While the concept may not make logical sense when reading out, if you take the time to process it, it makes perfect sense.  Let's take a moment and remember the epic battle from the Legend of Zelda: The Ocarina of Time between Link and Gannon at the end of the game.  Gannon has a weak spot that Link must hit.  The game is programmed so that IF Link hits Gannon in the correct placement (THAT) THEN Gannon gets hurt OR if the player misses then Gannon does not get hurt (ELSE).

While in a complex video there are many different if/else statements at play, the ability for users in scratch to make use of this powerful tools allows them to make even better programs.   For example, users can program score sheets to award different points for different questions, users can force a restart of the game when a player gets a certain amount wrong, different sound effects can be triggered.  Really, the possibilities are endless with this powerful little statement.



No comments:

Post a Comment