Untitled
unknown
java
2 years ago
341 B
3
Indexable
package piezas;
public class Rey extends Piezas {
public Rey(String color) {
super("Rey", color);
}
@Override
public boolean esMovimientoValido(int origenX, int origenY, int destinoX, int destinoY) {
return Math.abs(destinoX - origenX) <= 1 && Math.abs(destinoY - origenY) <= 1;
}
}
Editor is loading...
Leave a Comment