import java.util.*;
class Killer {
String name;
int cost;
void purchase(){
System.out.println("You bought " + name + " (" + cost + " points used)");
}
}
public class Main {
public static void main (String[] args) {
Scanner scanner = new Scanner(System.in);
int[] characters = {0,0,0};
String command;
Killer friendBro = new Killer(); //pursuer old name!!!!!! (i joined at quality of death btw);
friendBro.name = "Pursuer";
friendBro.cost = 0;
Killer badware = new Killer();
badware.name = "Badware";
badware.cost = 500; //changed cost after fashionably late, but i want to stick with old one lol;
Killer artful = new Killer();
artful.name = "Artful";
artful.cost = 700; //artful being 500 points??? no way bro just become 700;
System.out.println("Choose (Pursuer, Badware, Artful, Close Shop)");
while (true) {
command = scanner.nextLine();
System.out.println(command);
if (command.equals("Pursuer")) {
if (characters[0] == 0) {
friendBro.purchase();
characters[0] = 1;
} else {
System.out.println("You equipped Pursuer");
}
} else if (command.equals("Badware")) {
if (characters[1] == 0) {
badware.purchase();
characters[1] = 1;
} else {
System.out.println("You equipped Badware");
}
} else if (command.equals("Artful")) {
if (characters[2] == 0) {
artful.purchase();
characters[2] = 1;
} else {
System.out.println("You equipped Artful");
}
} else if (command.equals("Close Shop")) {
System.out.println("You closed shop.");
break;
} else {
System.out.println("I'm not quite sure I understand you");
break;
}
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: