Commit deda6f73 authored by MAhrens's avatar MAhrens
Browse files

Changed win/lose conditions

parent 3560e53b
......@@ -22,6 +22,7 @@ import org.milderjoghurt.frozennumbers.screens.GameScreen.Player;
import java.util.Map;
public class GameOverScreen implements Screen {
Player winner;
Game game;
public static Map<String, Screen> m_Screens;
Sprite bg;
......@@ -35,6 +36,7 @@ public class GameOverScreen implements Screen {
public GameOverScreen(int p1Score, int p2Score, Player winner) {
p1 = p1Score;
p2 = p2Score;
this.winner = winner;
wWidth = FrozenNumbersGame.viewport.getWorldWidth();
wHeight = FrozenNumbersGame.viewport.getWorldHeight();
......@@ -95,7 +97,7 @@ public class GameOverScreen implements Screen {
String p1String = new String();
String p2String = new String();
if (p1 > p2) {
/*if (p1 > p2) {
p1String = "WIN";
p2String = "LOSE";
}
......@@ -106,6 +108,13 @@ public class GameOverScreen implements Screen {
if (p2 == p1) {
p1String = "DRAW";
p2String = "DRAW";
}*/
if (winner.lower){
p1String = "WIN";
p2String = "LOSE";
} else{
p2String = "WIN";
p1String = "LOSE";
}
// Draw Players Results
......
......@@ -41,6 +41,7 @@ public class GameScreen implements Screen {
public int score = 0;
public boolean placedBubbleThisRound = false;
float timer = 0;
boolean lower;
}
Player p1 = new Player();
......@@ -72,6 +73,9 @@ public class GameScreen implements Screen {
wWidth = FrozenNumbersGame.viewport.getWorldWidth();
wHeight = FrozenNumbersGame.viewport.getWorldHeight();
p1.lower = true;
p2.lower = false;
nachbarn = new HashMap<Hexagon, Bubble>();
removes = new ArrayList<Hexagon>();
frozenHexagons = new ArrayList<Hexagon>();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment