Implement minor changes in game start function

This commit is contained in:
2026-05-09 14:42:00 +03:30
parent eaa0640a9c
commit f07c1416df
@@ -20,11 +20,6 @@ public class MenuActions {
public void startGame(Player player) {
while (player.getKeysCollectedCount() < 3) {
// System.out.println("Keys collected: " + player.getStringKeysCollected());
// if (askInventory(player)) {
//
// };
askInventory(player);
Enemy enemy = chooseEnemy();
Entity winner = fight(player, enemy);
@@ -34,7 +29,12 @@ public class MenuActions {
}
}
if (player.getKeysCollectedCount() == 3) {
askInventory(player);
bossFight(player);
}
}
private void bossFight(Player player) {
System.out.println("Congratulations! You have successfully collected all 3 keys\n" +
"You may now fight the Dragon");
System.out.println("Make sure to upgrade before entering the castle!");
@@ -48,8 +48,6 @@ public class MenuActions {
}
}
}
private Enemy chooseEnemy() {
while (true) {
Location location = new Location();