From 68cc2753021e5d4c36f00706bf7f12807df6fdff Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 25 Jun 2021 14:40:04 +0200 Subject: [PATCH] =?UTF-8?q?endMatch=20=C3=A9valu=C3=A9=20avant=20endRound?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/gameplay/match/match.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/gameplay/match/match.java b/src/main/java/gameplay/match/match.java index dd1257a..bf545a3 100644 --- a/src/main/java/gameplay/match/match.java +++ b/src/main/java/gameplay/match/match.java @@ -132,7 +132,7 @@ public class match { */ private static void endRound() { roundCounter++; - String victoryTxt = roundP1 ? "Player1 won the round"+roundCounter : "Player2 won the round"+roundCounter; + String victoryTxt = roundP1 ? "Player1 won the round "+roundCounter : "Player2 won the round "+roundCounter; System.out.println(victoryTxt); matchWon = new UIElementText(victoryTxt, 5f, 0.25f, 0.5f, 200f, engine); @@ -162,7 +162,7 @@ public class match { private static void endMatch() { String victoryTxt = roundsWonP1 > roundsWonP2 ? "P1 won the match" : "P2 won the match"; - matchWon = new UIElementText(victoryTxt, 5f, 0.25f, 0.5f, 200f, engine); + matchWon = new UIElementText(victoryTxt, 5f, 0.3f, 0.5f, 200f, engine); matchWon.setShader("/shaders/StylishShaders/WavyTextVert.glsl", "/shaders/StylishShaders/TextFrag.glsl", true, true); engine.add_uiElement(matchWon); @@ -357,8 +357,8 @@ public class match { //end round case 11: + if(roundsWonP1 >= (rounds/2 +1) || roundsWonP2 >= (rounds/2 +1)) { endMatch(); break;} endRound(); - if(roundsWonP1 >= (rounds/2 +1) || roundsWonP2 >= (rounds/2 +1)) { endMatch();} //TODO : will probably need to specify more acCode = 0; break;