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: Keep Track of Game Rounds

This video was last updated on Jul 14 2022

Your first challenge: Modify Bull’s Eye to keep track of the current round of the game.

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.

You’ve done a bit of coding in this part so it’s now time for your challenge. Your challenge this time is to pause the video, and modify Bull’s Eye to keep track of the current round of the game and display it.

private var currentRound = 1
binding.gameRoundTextView?.text = currentRound.toString()
currentRound += 1
binding.gameRoundTextView?.text = currentRound.toString()
targetValue = Random.nextInt(1, 100)
binding.targetTextView.text = targetValue.toString()

Reviews

Comments