Post

Replies

Boosts

Views

Activity

Reply to Bug in learn to code 2
let totalGems = randomNumberOfGems var gemCounter = 0 let character = Character() while gemCounter < totalGems {     for j in 0...6 {         for i in 2...4 {             world.place(character, atColumn: i, row: j)             if character.isOnGem {                 character.collectGem()                 gemCounter = gemCounter + 1             }         }     } }
Oct ’22