Swift Playgrounds: decision tree

Swift Playgrounds: decision tree

In PLP we have been using Swift Playgrounds to learn how to code. It has been great so far and I have really been enjoying it. Right now I am on the level Decision Tree it’s actually quite challenging. In this level you must collect all the gems and turn on all the switches however what is on the certain tile is randomized it could be a gem or a switch that is on or off. This makes completing the level more difficult because you not only have to move Bite (the character) around but also to tell him what to do if he lands on a certain tile. This is resolved by coding in an if. An if is telling Bite that if he comes across a certain thing how to react. This is probably the hardest level yet but I am close to beating it. Leading up to this we have been going over coding terms and doing the Hustle to learn how coding is lots of steps. We also got to meet people from Apple who asked us about Swift and how we are enjoying it. Coding has been a great class for me so far and I look forward to continuing it.