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.

23 lines
463 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, Figure[] 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. // TODO: im Falle von Schach muss Zug Situation auflösen, sonst nicht möglich
  16. return true;
  17. }
  18. }