H-Cost debug
parent
b5b8cda739
commit
484fd6f84e
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
BIN
bin/Brick.class
BIN
bin/Brick.class
Binary file not shown.
BIN
bin/Game.class
BIN
bin/Game.class
Binary file not shown.
BIN
bin/Ghost.class
BIN
bin/Ghost.class
Binary file not shown.
BIN
bin/Lives.class
BIN
bin/Lives.class
Binary file not shown.
BIN
bin/Main.class
BIN
bin/Main.class
Binary file not shown.
BIN
bin/Map.class
BIN
bin/Map.class
Binary file not shown.
Binary file not shown.
BIN
bin/Player.class
BIN
bin/Player.class
Binary file not shown.
BIN
bin/Point.class
BIN
bin/Point.class
Binary file not shown.
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue