diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index 427591e..a704596 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -87,6 +87,7 @@ public class match { private static float slowFactor = 1f; private static long timeStampFpsCounter; private static int frameCounter; + private static int roundCounter=0; private static Sprite objP1,objP2; private static Engine engine; @@ -127,7 +128,8 @@ public class match { * Used for playing animations and such. */ private static void endRound() { - String victoryTxt = roundP1 ? "Player1 won the round" : "Player2 won the round"; + roundCounter++; + String victoryTxt = roundP1 ? "Player1 won the round"+roundCounter : "Player2 won the round"+roundCounter; System.out.println(victoryTxt); roundWon = new UIElementText(victoryTxt, 5f, 0.25f, 0.5f, 200f, engine); @@ -339,7 +341,7 @@ public class match { //end round case 11: endRound(); - if(roundsWonP1 >= 2 || roundsWonP2 >= 2) { endMatch();} //TODO : will probably need to specify more + if(roundsWonP1 >= (rounds/2 +1) || roundsWonP2 >= (rounds/2 +1)) { endMatch();} //TODO : will probably need to specify more acCode = 0; break; diff --git a/src/launcher/Settings.java b/src/launcher/Settings.java index 08610f6..b4d80ee 100644 --- a/src/launcher/Settings.java +++ b/src/launcher/Settings.java @@ -95,6 +95,14 @@ public class Settings { System.exit(1); } catch (ParseException e) { System.out.println("Invalid config file"); + rounds = 3; + p1 = "default"; + p2 = "default"; + width = 800; + height = 600; + fullscreen = false; + hitboxes = false; + stage = "default"; } }