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

Boost your skills with a raywenderlich.com 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 Jul 14 2022

Implement the bonus point feature based on how close the player is to the target value.

Contributors

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 raywenderlich.com Professional subscription.

I have an idea on how to make Bullseye a bit more fun. What if we modified bullsye to give the player an additional 100 bonus point when they hit a perfect score? This would encourage the players to really try and place the bullseye exactly on the target.

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

Reviews

Comments