Get immediate access to this and over 1,500+ other videos and books.

Boost your skills with a Beginner subscription. With over 60+ video courses and our core foundational programming books bundled in one subscription, it’s simply the best investment you can make in your development career.

Challenge: Add Bonus Points

This video was last updated on Apr 12 2022

Get some practice with coding basics by giving the user bonus points if they are very close to the target.


Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a Professional subscription.

I have another challenge for you in this section, and it involves a bit of Dart coding. Your challenge is to pause this video, and modify Bull’s Eye to give the player an additional 100 bonus points when they get a perfect score.

var bonus = 0;
if (difference == 0) {
    bonus = 100;
} else if (difference == 1) {
    bonus = 50;
return maximumScore - difference + bonus;