Your First Kotlin Android App: Polishing the App

Jul 14 2022 · Kotlin 1.6, Android 12, Android Studio Bumblebee | 2021.1.1

Part 1: Build Out the App

07. Challenge: Add Bonus Points

Episode complete

Play next episode

Next
About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 06. Improve the Alert Title Next episode: 08. Restart the Game

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

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