mise en place d'un runner pour windows (UTF-8)

This commit is contained in:
2024-05-14 20:20:42 +02:00
parent d6f2438742
commit 22d58c8589
6 changed files with 69 additions and 173 deletions

View File

@@ -14,6 +14,7 @@ public class Terminal {
private static Scanner scanner;
private static Map map;
private static Personnage[] personnages;
private int round = 0;
public static boolean edges = false;
@@ -86,7 +87,7 @@ public class Terminal {
return false;
}
private static void run() {
private void run() {
TerminalDisplay.clearTerminal();
if (edges) map.addEdges();
boolean isNotGameOver = true;
@@ -99,11 +100,17 @@ public class Terminal {
for (i = 0; i<personnages.length; i++) {
Personnage personnage = personnages[i];
System.out.println("\nJoueur " + (i+1) + " : " + personnage.getName());
int[] coordinate = personnage.getPrimaryCoordinate();
System.out.println("Round : " + this.round + " | N : " + Personnage.n);
System.out.println(" Joueur " + (i+1) + " : " + personnage.getName() +
" (" + coordinate[0]+", "+ coordinate[1] +") | size : " + personnage.getSize());
isNotGameOver = instancePersonnage(personnage);
if(isNotGameOver) placePersonnages(personnages);
else break;
}
this.round++;
}
System.out.println("Le joueur " + (i+1) + " à perdu !");
}