Commit 8519d4bf authored by hosein's avatar hosein

king -> getXY added

parent c084a160
...@@ -24,8 +24,11 @@ public class King extends Nut { ...@@ -24,8 +24,11 @@ public class King extends Nut {
return Math.pow(x - destination[0], 2) + Math.pow(y - destination[1], 2) <= 2; return Math.pow(x - destination[0], 2) + Math.pow(y - destination[1], 2) <= 2;
} }
public boolean isCheck() { public int[] getXY(){
return false; int[] r = new int[2];
r[0] = x;
r[1] = y;
return r;
} }
@Override @Override
...@@ -37,4 +40,6 @@ public class King extends Nut { ...@@ -37,4 +40,6 @@ public class King extends Nut {
public boolean canRoute(int[] destination, int[][] ground) { public boolean canRoute(int[] destination, int[][] ground) {
return true; return true;
} }
} }
Markdown is supported
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