basic gameloop logic

This commit is contained in:
albyg 2025-05-13 19:51:25 +02:00
parent b18d2619fa
commit c00feab2c3

View file

@ -6,27 +6,31 @@ public class TamaGolemMain {
public static void main(String[] args) { public static void main(String[] args) {
Scanner sc = new Scanner(System.in); Scanner sc = new Scanner(System.in);
System.out.println("TamaGolem"); Game game;
System.out.println("""
Player 1:
Choose your name
""");
Player p1 = new Player(sc.nextLine()); do {
System.out.println("TamaGolem");
System.out.println("""
Player 1:
Choose your name
""");
System.out.println(""" Player p1 = new Player(sc.nextLine());
Player 2:
Choose your name
""");
Player p2 = new Player(sc.nextLine()); System.out.println("""
Player 2:
Choose your name
""");
Game game = new Game(p1, p2, WorldBuilder.buildWorld()); Player p2 = new Player(sc.nextLine());
game.start(); game = new Game(p1, p2, WorldBuilder.buildWorld());
game.start();
} while (game.isRestart());
} }
} }