Post

Replies

Boosts

Views

Activity

Reply to Initializing Your Expert: turnLockUp() Doesn't Work
I finally discovered why I couldn't get the turnLockUp() method to work. I didn't know what the "lock" looked like or where on the platform to find it. It is on the forward edge of the platform. The Expert must be moved to the tile before the lock - which is just some amorphous blob on the screen that doesn't resemble a lock in any way - and then the turnLockUp() method invoked. Once that's done, nothing dramatic happens. You have to look on the right side of the platform, where the final gem is located. A small, white disk rises slowly up to the main level of the platform. Now it is possible to move the Expert to the tile over which the last gem is positioned. This was an extremely frustrating experience. The developers of the Swift Playground would do well to review the instructions in this lesson. Maybe indicate what a "lock" looks like and where it is located, perhaps?
Sep ’25
Reply to Swift Playground - Types Lesson
I decided to stick with Swift Playground for the time being. Although I wanted to give up, I decided to take another crack at solving the challenge. Looking at the expected solution provided guidance, but I didn't just copy and paste the code. Instead I experimented with various moveForward() commands to move Byte around. That was perhaps my biggest mental block. I didn't realize that I needed to access each switch, toggle it, and then return to the center tile, rinse() and repeat(). 😍 /*First, we must turn off the portal, otherwise Byte will fall through it and not get to any of those switches */ greenPortal.isActive = false /*Define a function to move Byte forward 3 tiles */ func moveThree() { for i in 1...3 { moveForward() } } /*Define a function that causes Byte to move back to the center tile, on which is the deactivated green portal thingy */ func returnToCenter() { //Bring Byte back to center tile //from any Toggle it happens to //be on currently //Two turns will orient Byte in //the direction opposite to which it //moved to the switch turnRight() turnRight() moveThree() } /*Write code to do all of the following: - Toggle switch on left side of puzzle - Toggle switch at far end of puzzle - Toggle switch at right side of puzzle - After each task is complete, return Byte to the center tile, rotate him 90 degrees and repeat - Finally, with Byte back on the center tile, - reactivate the green portal, which will teleport - him to the finish line (or tile) */ //Get Byte to the center tile moveThree() /*The following code applies for all three tiles */ for tile in 1...3 { turnLeft() moveThree() toggleSwitch() returnToCenter() } /*Byte has toggled all three switches so it's time to finish up */ greenPortal.isActive = true I am glad I stuck with the challenged and worked out how to complete the assigned task. Not sure if my solution is the most streamlined, but it does seem to work. Thanks again for your kind assistance and guidance.
Sep ’25
Reply to Swift Playground - Types Lesson
Thank you so much for your reply. It seems that the term "greenPortal" refers to the circular objects illuminated in green over certain tiles. I could not solve this exercise and had to look at the solution, which I never would have figured out on my own. The solution introduces functions, which were not discussed previously, as far as I can tell. Also, I am confused (again) by what is a portal and what is a switch. Perhaps I should abandon using the Swift Playground, as it is, in my opinion, very poorly designed and is not teaching me much about Swift programming. Having already taken several courses in Python, C# and VB.NET, as well as having programmed in Excel VBA for over 27 years, perhaps a less cutesy application that's geared towards experienced programmers would be more suitable for me, as you have indicated. Thank you kindly.
Sep ’25