diff --git a/bin/Game.class b/bin/Game.class index d7cfcc1..97fc00c 100644 Binary files a/bin/Game.class and b/bin/Game.class differ diff --git a/bin/Map.class b/bin/Map.class index 56461e1..e3855a7 100644 Binary files a/bin/Map.class and b/bin/Map.class differ diff --git a/src/Game.java b/src/Game.java index 141b813..4ca878b 100644 --- a/src/Game.java +++ b/src/Game.java @@ -274,6 +274,9 @@ public class Game { score++; scoreLabel.setText(Integer.toString(score)); + if(score == Map.maxScore) { + System.out.println("YOU WON!!!"); + } } } } diff --git a/src/Map.java b/src/Map.java index 94fa77d..9a56721 100644 --- a/src/Map.java +++ b/src/Map.java @@ -19,6 +19,8 @@ public class Map { public static int ghost_posX[] = new int[4]; public static int ghost_posY[] = new int[4]; + public static int maxScore; + public static int pac_posX; public static int pac_posY; @@ -70,6 +72,7 @@ public class Map { ghost_posY[3] = 10 + 20 * i; } else if (line.charAt(j) == ' ') { points[i][j] = new Point(10 + 20 * j, 10 + 20 * i); + maxScore++; } } catch (Exception e) {