Question
Challenge: hasSteed In Chapter 1, your challenge was to try out some mathematical operations in the Kotlin REPL. Most of the challenges in the rest
Challenge: hasSteed
In Chapter 1, your challenge was to try out some mathematical operations in the Kotlin REPL. Most of the challenges in the rest of the book are based on the project you have been working on in this case, bounty-board. Before beginning a challenge, make a copy of your project and attack the challenge in that copy. Many chapters build on previous chapters, and working on challenges in a copy of the project ensures that you will be able to progress through the book.
Here is your first challenge based on bounty-board: In the text adventure game, players can acquire a dragon or minotaur to ride. Define a variable called hasSteed to track whether the player has acquired one. Give the variable an initial state indicating that the player does not have one yet.
Remember to create a copy of bounty-board before making these changes.
Below is the copy of bounty-board. This was made with IntelliJ IDEA CE (Kotlin)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started