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.

31 lines
895 B

  1. package de.fd.fh;
  2. public class Game
  3. {
  4. public Figure[] mField;
  5. public static final int whiteRowOther = 0;
  6. public static final int whiteRowFarmer = 1;
  7. public static final int blackRowOther = 6;
  8. public static final int blackRowFarmer = 7;
  9. public void initNewGame()
  10. {
  11. mField = new Figure[Figure.fieldLength * Figure.fieldLength];
  12. // Figuren platzieren
  13. for (int i = 0; i < Figure.fieldLength; i++) // row
  14. {
  15. if (i == Game.whiteRowOther
  16. || i == Game.whiteRowFarmer
  17. || i == Game.blackRowOther
  18. || i == Game.blackRowFarmer)
  19. {
  20. for (int j = 0; j < Figure.fieldLength; j++) // col
  21. {
  22. mField[i * Figure.fieldLength + j] = new Figure();
  23. }
  24. }
  25. }
  26. }
  27. }