Post

Replies

Boosts

Views

Activity

in swiftplay ground
Hello i’m SwiftPlayground newby. in swiftplayground while !isBlocked { while !isBlocked { moveForward()} turnRight()} i did this code in 2 coner way(here is the picture in down) and the robot turn right when he is blocked. but the code is ‘while !isBlocked {turnRight()}’. why this code works likes this?
0
0
363
Mar ’23
in swiftplay ground
Hello i’m SwiftPlayground newby. in swiftplayground while !isBlocked { while !isBlocked { moveForward()} turnRight()} i did this code in 2 coner way(here is the picture in down) and the robot turn right when he is blocked. but the code is ‘while !isBlocked {turnRight()}’. why this code works likes this?
Replies
0
Boosts
0
Views
363
Activity
Mar ’23