Post

Replies

Boosts

Views

Activity

Comment on Swift Playground - Round up the switches - character won't move
I know I'm late to this reply, but if anyone else stumbles across this and is stuck, my suggestion: while switchCount < gemCount || gemCount < 1{     movement()     collect()     toggle() } The original post wouldn't run as both gem and switch count were at 0 and the while loop depended on switchCount < gemCount. This allows the loop to start and will stop when switchCount > gemCount.
Jan ’23
Comment on Swift Playground - Round up the switches - character won't move
I know I'm late to this reply, but if anyone else stumbles across this and is stuck, my suggestion: while switchCount < gemCount || gemCount < 1{     movement()     collect()     toggle() } The original post wouldn't run as both gem and switch count were at 0 and the while loop depended on switchCount < gemCount. This allows the loop to start and will stop when switchCount > gemCount.
Replies
Boosts
Views
Activity
Jan ’23