From 8215eef84074a94fa2d2cb371855da64eefdee96 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Sun, 20 Mar 2016 23:42:50 +0200 Subject: [PATCH] Never ending game fix --- src/com/sagi/dayan/Games/Engine/GameEngine.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/com/sagi/dayan/Games/Engine/GameEngine.java b/src/com/sagi/dayan/Games/Engine/GameEngine.java index a810545..5ce6e35 100644 --- a/src/com/sagi/dayan/Games/Engine/GameEngine.java +++ b/src/com/sagi/dayan/Games/Engine/GameEngine.java @@ -171,24 +171,24 @@ public class GameEngine { currentLevel++; stage.removeMouseListener(scene); stage.removeKeyListener(scene); - switch (currentLevel){ + switch (currentLevel%7){ case 0: - scene = new FirstStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE 1.0 =-", new int[]{5, 5}); + scene = new FirstStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE "+(currentLevel+1)+".0 =-", new int[]{5, 5}); break; case 1: - scene = new SecondStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE 2.0 =-", new int[]{5, 5,5}); + scene = new SecondStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE "+(currentLevel+1)+".0 =-", new int[]{5, 5,5}); break; case 2: - scene = new ThirdStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE 3.0 =-", new int[]{5, 0,2,8}); + scene = new ThirdStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE "+(currentLevel+1)+".0 =-", new int[]{5, 0,2,8}); break; case 3: - scene = new FourthStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE 4.0 =-", new int[]{5, 0,0,7}); + scene = new FourthStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE "+(currentLevel+1)+".0 =-", new int[]{5, 0,0,7}); break; case 4: - scene = new FifthStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE 5.0 =-", new int[]{5, 1,3,8, 10, 10}); + scene = new FifthStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE "+(currentLevel+1)+".0 =-", new int[]{5, 1,3,8, 10, 10}); break; case 5: - scene = new SixthStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE 6.0 =-", new int[]{5, 0,0,0, 0, 0, 10, 20}); + scene = new SixthStage(pWidth, pHeight, numOfPlayers, this, "-= STAGE "+(currentLevel+1)+".0 =-", new int[]{5, 0,0,0, 0, 0, 10, 20}); break; case 6: scene = new BlitzStage(pWidth, pHeight, numOfPlayers, this, "-= BLITZ STAGE =-", new int[]{5, 0,0,0, 0, 0, 0, 0, 0, 0, 0});