Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

could someone help me with this assignment? 1. Initialize the user's Pokemon with a pair of arrays: - a predefined array of strings that include

could someone help me with this assignment?image text in transcribed

1. Initialize the user's Pokemon with a pair of arrays: - a predefined array of strings that include the name of the Pokemon and the name of four moves. (Example - player_pokemon = ("Mewtwo", "Psychic", "Shadow Ball", "Aura Sphere", "Thunderbolt");) - a predefined array of stats, including HP and four moves with their respective power. (Example: player_stats ={100,90,80,80,90};} 2. Initialize the opponent's Pokemon with a pair of arrays (just like the player Pokemon). 3. Print a welcome message and display the user's Pokemon stats and the opponent's Pokemon stats. 4. Loop through the battle until one Pokemon faints. 5. For each turn: - Print a list of moves available to the user and prompt the user to choose a move. - Calculate the damage done to the opponent based on the user's move choice and print the damage done. - Check if the opponent fainted. - Choose a random move for the opponent. - Calculate the damage done to the user by the opponent's move and print the damage done. - Check if the user fainted. 6. Print the winner of the battle. Implementation Details Your program should be implemented in Java and use 1-d arrays to store the Pokemon stats. You should also use simple user-defined methods to implement the following functionality: - Prints the welcome message and displays the user's Pokemon stats and the opponent's Pokemon stats. - : Prints a list of moves available to the user. - getuserMoveChoice : Prompts the user to choose a move and returns the move choice. - Calculates the damage done to the opponent or the user based on the Pokemon stats and move power and returns the damage done. This method should have some element of randomness so that it will return a value proportional to movePower. - Checks if the opponent or the user fainted and returns a boolean value indicating the result. - Chooses a random move for the opponent and returns the move choice. - : Prints the result of the user's or the opponent's move, including the move choice and the damage done

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 Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

Students also viewed these Databases questions

Question

Azure Analytics is a suite made up of which three tools?

Answered: 1 week ago

Question

=+ 4. How can policymakers infl uence a nations saving rate?

Answered: 1 week ago