Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added New Character Nina Williams #6

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions tekken/Character.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ abstract class Characters{
abstract void jin();
abstract void kazuya();
abstract void king();
abstract void nina();
}

public class Character extends Characters{

//class variables
String name;
String[] chr = {"1.Jin Kazama","2.Kazuya Mishima","3.King"};
String[] chr = {"1.Jin Kazama","2.Kazuya Mishima","3.King","4.Nina Williams"};

//objects
Scanner sc = new Scanner(System.in);
Expand Down Expand Up @@ -41,13 +42,16 @@ void chrSelect() {
case 3:
king();
break;
case 4:
nina();
break;
default:
System.out.println("This Character Dose not Exist");
}
}

//Character Names without Numbers
String[] ChrName = {"Jin Kazama","Kazuya Mishima","King"};
String[] ChrName = {"Jin Kazama","Kazuya Mishima","King","Nina Williams"};
int randChr = rand.nextInt(ChrName.length);

@Override
Expand All @@ -70,4 +74,11 @@ void king() {
System.out.println("You have Selected King");
r1.Round1(ChrName[2],ChrName[randChr]);
}

@Override
void nina() {
System.out.println();
System.out.println("You have Selected Nina Williams");
r1.Round1(ChrName[3],ChrName[randChr]);
}
}