Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA PROGRAMING The Treasure Hunt Game The board now also contains 20 trolls that will take away all your treasure if you land on one!

JAVA PROGRAMING

The Treasure Hunt Game

The board now also contains 20 trolls that will take away all your treasure if you land on one!

20 distinct trolls (not on top of each other or a treasure)

User Stories

As a player, when I click on the board, in addition to a treasure or nothing, I may encounter a troll at random positions.

As a player, when I click on the board and encounter a troll, the troll is always one position in away from a treasure in the horizontal and vertical directions.

As a player, when I click on a troll, I lose all your treasures.

As a player, when the game is over, I can see where all the treasures and trolls are located on the board.

Technical Implementation

Follow the these directions:

Implement each story one at a time in the order given.

Keep each class in a separate file.

Use the CRC card format from the Chapter 8 (p. 547-548) to explain in a comment right before the class definition what the responsibilities and functions of the class are. Be sure to have a Responsibilities and a Collaborating Classes sections.

Extend the BoardButton (or JButton class, depending on what you did in the first week) to create a TrollButton class instances of which are on the board

Change the look of the button when a user clicks on it: change the text or the icon

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

What distinguishes craft and industrial unions from each other?

Answered: 1 week ago

Question

Q.No.1 Explain Large scale map ? Q.No.2 Explain small scale map ?

Answered: 1 week ago