Commit 8519d4bf authored by hosein's avatar hosein

king -> getXY added

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