Design and implement an application that plays a game


Project Assignment: Two Movable Vertices and Their Distance

Design and implement an application that plays a game called Catch-the-Creature.

Use an image to represent the creature (any image you can search online). Have the creature appear at a random location for a random duration, then disappear and reappear somewhere else. The goal is to "catch" the creature by pressing the mouse button while the mouse pointer is on the creature image. Display a count of the number of times the creature is caught. Add a "start" button and a "stop" button.

When start button is pressed, the play starts. When stop button is pressed, the game is over and the creature stops at its current position and does not disappear anymore.

Some things you would consider:

1. Separate your code into two java classes as the examples we used in class and labs: one to set up the frame and one to maintain the contents in your pane.

2. Make sure your image is with proper size according to the panel size. You can check the width and height of an image by right-clicking the image, and then properties and details. This helps you decide if the user mouse clicking is within the image.

3. Timeline class should be used to implement the "disappear" and "reappear" effect.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Design and implement an application that plays a game
Reference No:- TGS02293011

Expected delivery within 24 Hours