diff --git a/assets/Highscores.txt b/assets/Highscores.txt new file mode 100644 index 0000000..e69de29 diff --git a/assets/Pacman_Original.png b/assets/Pacman_Original.png deleted file mode 100644 index dff9dfb..0000000 Binary files a/assets/Pacman_Original.png and /dev/null differ diff --git a/bin/BigPoint.class b/bin/BigPoint.class index b34987f..c92c3e0 100644 Binary files a/bin/BigPoint.class and b/bin/BigPoint.class differ diff --git a/bin/Brick.class b/bin/Brick.class index 50ef0ed..98f1c69 100644 Binary files a/bin/Brick.class and b/bin/Brick.class differ diff --git a/bin/Game.class b/bin/Game.class index a108f3a..7987afa 100644 Binary files a/bin/Game.class and b/bin/Game.class differ diff --git a/bin/Ghost.class b/bin/Ghost.class index e1ea721..3a789ee 100644 Binary files a/bin/Ghost.class and b/bin/Ghost.class differ diff --git a/bin/Lives.class b/bin/Lives.class index a774fe7..f55526b 100644 Binary files a/bin/Lives.class and b/bin/Lives.class differ diff --git a/bin/Main.class b/bin/Main.class index 1a83356..ef3f066 100644 Binary files a/bin/Main.class and b/bin/Main.class differ diff --git a/bin/Map.class b/bin/Map.class index a288e72..6541853 100644 Binary files a/bin/Map.class and b/bin/Map.class differ diff --git a/bin/Picture.class b/bin/Picture.class index f720bca..3737254 100644 Binary files a/bin/Picture.class and b/bin/Picture.class differ diff --git a/bin/Player.class b/bin/Player.class index daa323b..56c9ae4 100644 Binary files a/bin/Player.class and b/bin/Player.class differ diff --git a/bin/Point.class b/bin/Point.class index 8431eb4..b863839 100644 Binary files a/bin/Point.class and b/bin/Point.class differ diff --git a/src/Game.java b/src/Game.java index f0eff60..c845e2d 100644 --- a/src/Game.java +++ b/src/Game.java @@ -133,10 +133,11 @@ public class Game { } } } - frame.setVisible(true); - + + delay(30); lastT = System.nanoTime(); // delta time - + + frame.setVisible(true); while (true) { // Hauptschleife frames++; if (ghosts[0].feared == true) { @@ -218,7 +219,7 @@ public class Game { minn = HCost[j]; } } - + System.out.println(HCost[0]+ " "+HCost[1]+ " "+ HCost[2] + " "+HCost[3] ); for (int j = 0; j < 4; j++) { if (HCost[j] == minn) { if (j == 0) { diff --git a/src/Ghost.java b/src/Ghost.java index ba1af44..829aaaa 100644 --- a/src/Ghost.java +++ b/src/Ghost.java @@ -58,7 +58,7 @@ public class Ghost extends Picture { // Die .sqrt(Math.pow((((xPos - 10) / 20) + mod_x) - ((player.getPos('x', 0) - 10 + 80) / 20), 2) + Math.pow((((yPos - 10) / 20) + mod_y) - ((player.getPos('y', 0) - 10) / 20), 2)); } else if (type == 2) { - HCost = (int) Math.sqrt(Math.pow((((xPos - 10) / 20) + mod_x) - ((300 - 10 + 80) / 20), 2) + HCost = (int) Math.sqrt(Math.pow((((xPos - 10) / 20) + mod_x) - ((250 - 10 + 80) / 20), 2) + Math.pow((((yPos - 10) / 20) + mod_y) - ((100 - 10) / 20), 2)); } else if (type == 3) { HCost = (int) Math.sqrt(Math.pow((((xPos - 10) / 20) + mod_x) - ((player.getPos('x', 0) - 10) / 20), 2)