9 package micropolisj.engine;
26 0, 0, 6, 8, 6, 0, -6, -8, -6
29 0, -8, -6, 0, 6, 8, 6, 0, -6
34 this(engine, xpos, ypos, xDest, yDest, 2,
ownerID);
69 public static int getDir(
int orgX,
int orgY,
int desX,
int desY) {
72 0, 3, 2, 1, 3, 4, 5, 7, 6, 5, 7, 8, 1
74 int dispX = desX - orgX;
75 int dispY = desY - orgY;
99 dispX = Math.abs(dispX);
100 dispY = Math.abs(dispY);
102 if(dispX <= 6 || dispY <= 6) {
105 else if(dispY < dispX)
109 if(z >= 1 && z <= 12) {
117 int absY = Math.abs(
destY -
y);
118 int absX = Math.abs(
destX -
x);
119 int diffMin = Math.min(absX, absY);
120 int diffMax = Math.max(absX, absY);
121 return (diffMin / 6 + (diffMax - diffMin) / 8) /
speedFactor;
137 double soundDuration = 3.25;
146 System.out.println(
"explode");