Get some final practice with coding basics by giving the user bonus points if they are very close to the target.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5993-your-first-ios-app/lessons/29
Get some final practice with coding basics by giving the user bonus points if they are very close to the target.
Hi! Thank you for the great tutorial. Iβve noticed that in this video there is a bug with score variable: we calculate final score before bonus points calculations. And looks like there is no fix for that in the following video. Correct me if Iβm wrong but this is very frustrating.
I noticed that bug as well. Iβve only watched the next coding video, and Iβm not sure heβs gonna fix it.
Oops! Luckily this is a pretty easy fix, just move this line:
score += points
below the if/else statements that modify the points (i.e. right before let message = ...
). I hope that helps!