A Swift Playground project for WWDC2019 scholarship submission. It is designed to teach basic algorithm in a fun and engaging way. This submission is accepted by Apple for Scholarship.
The objective of the game is to program the narwhale to collect all 5 keys that are scattered in a randomly generated map while avoiding traps. In order to move the narwhale player must program the narwhale in advance using a sequence of 8 commands. They only have 5 turns to complete the objective but can gain an extra turn by collecting coins.
Move the narwhale one space forward.
Rotate the narwhale 90 degree anti-clockwise.
Rotate the narwhale 90 degree clockwise.
Pick up key or coin at current square.
Destroy a box in front of the narwhale.