You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
428 B
19 lines
428 B
package de.fd.fh;
|
|
|
|
public class FigureBishop extends Figure
|
|
{
|
|
@Override
|
|
public boolean moveAllowed(int src, int dst, Figure[] field)
|
|
{
|
|
if ((dst-src) % Figure.fieldLength == 0) // nach oben/unten nicht erlaubt
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if ((dst-src) % 7 != 0
|
|
&& (dst-src) % 9 != 0)
|
|
return false;
|
|
|
|
return super.moveAllowed(src, dst, field);
|
|
}
|
|
}
|