|
@ -5,6 +5,13 @@ public class FigureFarmer extends Figure |
|
|
@Override |
|
|
@Override |
|
|
public boolean moveAllowed(int src, int dst, int[] field) |
|
|
public boolean moveAllowed(int src, int dst, int[] field) |
|
|
{ |
|
|
{ |
|
|
|
|
|
int stepSize = src / fieldLength - dst / fieldLength; // hoch/runter |
|
|
|
|
|
|
|
|
|
|
|
if (stepSize > 1) // weißer Bauer nicht mehr als 1 Schritt nach "oben" |
|
|
|
|
|
{ |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return super.moveAllowed(src, dst, field); |
|
|
return super.moveAllowed(src, dst, field); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |