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.

21 lines
371 B

  1. package de.fd.fh;
  2. public class Figure
  3. {
  4. public static final int fieldLength = 8;
  5. public boolean moveAllowed(int src, int dst, int[] field)
  6. {
  7. if (src == dst)
  8. {
  9. return false;
  10. }
  11. if (field.length != Figure.fieldLength * Figure.fieldLength)
  12. {
  13. return false;
  14. }
  15. return true;
  16. }
  17. }