Post

Replies

Boosts

Views

Activity

Glitch in Swift Playgrounds Sphero Arcade “Back and Forth
In Swift Playgrounds Sphero Arcade 1, on the exercise “Back and Forth”, I’m having trouble setting the LED color. Can anyone help? Here is the code I put into my project: var currentPlayer = 1 func onCollision(data: CollisionData) {         stopRoll()         if currentPlayer == 1 {             currentPlayer = 2             setMainLed(color: UIColor.green) ERROR: Cannot find “UIColor” in scope             volley(baseAngle: 180)         } else {             currentPlayer = 1                          volley(baseAngle: 0)         }              }
2
0
1.2k
Feb ’21