Swift Playground

RSS for tag

Learn and explore coding in Swift through interactive learning experiences on the Swift Playground app for iPadOS and macOS.

Swift Playground Documentation

Posts under Swift Playground subtopic

Post

Replies

Boosts

Views

Created

In "Learning Programming 2", I can't use "world.place"
I'm trying the "Connect and Solve" course of Swift Playground. I can't use "world.place" to place bricks at positions (2, 2), (6, 2) (automatically disappear), but I can place bricks at positions (4, 2) in the same way. Two bricks must be placed overlapping in positions (2, 2) and (6, 2) to achieve the goal. Only when a brick is placed in position (4, 2) can the goal be achieved. The problem is that the bricks placed on (6, 2) and (2, 2) will disappear and cannot be placed successfully. The following is my code writing... let Block1 = Block() for i in 1 ... 2 { world.place(Block1, atColumn: 2, row: 2) } for i in 1 ... 2 { world.place(Block1, atColumn: 6, row: 2) } world.place(Block1, atColumn: 4, row: 2) func turnaround() { turnRight() turnRight() } func walk4() { for i in 1 ... 3 { moveForward() } } func collet() { for i in 1 ... 2 { moveForward() } toggleSwitch() turnRight() walk4() collectGem() turnaround() walk4() turnRight() } for i in 1 ... 3 { collet() } ‌I would appreciate it if someone could offer some recommendations.‌ ‌Thanks a lot‌
0
0
62
2w
Foundation Models support in Swift Playgrounds | SSC26
Hello. I'm building my Swift Student Challenge Project. But I noticed that the FoundationModels Framework isn't supported in Swift Playgrounds. My app uses ARKit, so it definitely should be tested on real device. So, is it possible to somehow implement a foundation models to my Swift Playgrounds app? Or is it possible to ask judges to test the app on real device launching it from xcode. Your answer is really important for because the functionality of my app directly depends on Foundation Models availability. Thank you!
1
0
90
1w