Skip to content
Snippets Groups Projects
Commit 3ae01da2 authored by Kellian Mirey's avatar Kellian Mirey
Browse files

Patch affichage

parent 6d5c4735
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ public class Display { ...@@ -9,6 +9,7 @@ public class Display {
public static Level level; public static Level level;
public static int row = 1; public static int row = 1;
public static int dec = 6;
public Display(Level l){ public Display(Level l){
this.level = l; this.level = l;
...@@ -36,7 +37,7 @@ public class Display { ...@@ -36,7 +37,7 @@ public class Display {
} }
public static void goToDialogBox(){ public static void goToDialogBox(){
setCursorPos(row+6,0); setCursorPos(row+dec,0);
//System.out.flush(); //System.out.flush();
} }
...@@ -45,6 +46,13 @@ public class Display { ...@@ -45,6 +46,13 @@ public class Display {
clearScreen(); clearScreen();
printDialogBox(); printDialogBox();
setCursorPos(row,0); setCursorPos(row,0);
/*
try {
level.fightScene();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}*/
level.displayLifePoints(); level.displayLifePoints();
goToDialogBox(); goToDialogBox();
} }
......
...@@ -58,8 +58,10 @@ public class Level{ ...@@ -58,8 +58,10 @@ public class Level{
// annonce un nouvel ennemi // annonce un nouvel ennemi
public void ennemyShowing() { public void ennemyShowing() {
Display.clearDialogBox();
System.out.println("An ennemy just appeared : " + this.ennemy.toString()); System.out.println("An ennemy just appeared : " + this.ennemy.toString());
System.out.println(); System.out.println();
Display.goToUserInput();
} }
public void ennemyFaster(Attack attack) throws IOException { public void ennemyFaster(Attack attack) throws IOException {
......
...@@ -42,9 +42,6 @@ class Main { ...@@ -42,9 +42,6 @@ class Main {
Display.goToDialogBox(); Display.goToDialogBox();
Display.newPrintln(enemy.toString());
Display.newPrintln(Terminal.RED_BACKGROUND + "ATTAQUEZ" + Terminal.RESET + " ou " + Terminal.PURPLE_BACKGROUND + "QUITTEZ" + Terminal.RESET);
Display.goToUserInput(); Display.goToUserInput();
ArrayList<Action> actionList = new ArrayList<>(); ArrayList<Action> actionList = new ArrayList<>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment