
public class WitchGame {
	static final String LINE_BREAK = "====================";

	public static void main(String[] args) {
		//Object Creation and Initialization
		Witch witch1 = new Witch();
		Witch witch2 = new Witch("Akko", "Luna Nova", 25);

		//toString() method test
		System.out.format("%s%n%s%n%s%n", LINE_BREAK, "Printing 2 witches", LINE_BREAK);
		System.out.format("%s%n%s%n", witch1.toString(), witch2.toString());

		//Getters and Setters test
		witch1.setName("Hermione Granger");
		witch1.setSchool("Hogwarts");
		witch1.setMagicPower(85);
		//compareTo(Witch w) test
		System.out.format("%s%n%s%n%s%n", LINE_BREAK, "Printing the comparison", LINE_BREAK);
		System.out.format("%s%n", parseCompareTo(witch1,witch2));
		
		//Copy Constructor test
		Witch witch3 = new Witch(witch1);
		witch3.levelUp(80);
		System.out.format("%s%n", parseCompareTo(witch2,witch3));
		
		//Print all witch
		System.out.format("%s%n%s%n%s%n", LINE_BREAK, "Now, printing all witches.", LINE_BREAK);
		System.out.format("%s%n%s%n%s%n",witch1.toString(),witch2.toString(),witch3.toString());
		
		//Print Total witches
		System.out.format("%s%n%s%n%s%n", LINE_BREAK, "Now, printing total number of witches", LINE_BREAK);
		System.out.println(Witch.getTotalWitches());
	}
	static String parseCompareTo(Witch witch1,Witch witch2) {
		return switch (witch1.compareTo(witch2)) {
		case 1:
			yield witch1.toString()+" has higher magic power.";
		case 0:
			yield "2 witch have equal magic power.";
		case -1:
			yield witch2.toString()+" has higher magic power.";
		default:
			yield "";
		};
	}
}
