Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I start to do this question but I don't know how to continue with it. Could you please help me, than you so much. Project
I start to do this question but I don't know how to continue with it. Could you please help me, than you so much.
Project 04 Extra Credit For up to two points of Extra Credit, modify the game to represent a "tournament" of dragon trainers. Instead of just playing one game and ending, play until one player has won two games, then show the final score as well as the total number of matches played. Note that you will need to include a loop in your code to make this work Please 8@1@es on of your dragons l Fire/Plant/Hatarj: yse Yau chose Fire dragon I chose: Water dragon Please select one of your dragons rire/Plant Mater Plant Yau chosa: Plant dragon I choser Water dragon Flense eelect one of your dragons Irire/Flant/Materl: Water You chose: Wator dragon I chaset ater draqon A riel Flease eelect one of your dragons Fire/Flant/Materli Water x*u h*8@ ; ilet-r dr@gon I choae: Fire dragon ater defeate rire - you win! Out at 4 matches you won 2, I w 1, and we tied 1 Congratulation you win the tournamentl 1 package osu.cse1223; 3 import java.util.Scanner; 4 5 public class Project04ExtraCredit t 7 public static void main(String[] args) 10 Scanner keyboardnew Scanner(System.in); 12 13 14 15 16 17 18 19 20 21 int a=3; int b (int) (Math.random()xa)+1; int c-0; int d-e; int Winning; Winning keyboard.nextInt(); String User; String Computer null; //Assign 1 to the Fire, 2 to the Plant, and the 3 to the Water Dragon; if(b -1) 23 24 25 26 27 28 29 30 31 32 Computer-"Fire"; Computer-"Plant"; Computer-"Water"; if(b-2) //User enter the type of the dragon System.out.println( "Plaese selevt one of your dragons [Fire/Plant/Water]: "); String Dragon; Dragon keyboard.nextLine); int match0; 34 35 36 37 38 39 40 41 42 43 //Use if-statement to determine which type of dragon the user chose if (matchStep 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