Position.java 517 B

12345678910111213141516171819202122232425262728293031323334
  1. package classes;
  2. /**
  3. * Coordinates of an Object on the canvas with a (int) x-coord and a (int).
  4. * y-coord
  5. *
  6. * @author Gruppe14
  7. *
  8. */
  9. public class Position {
  10. public int x;
  11. public int y;
  12. /**
  13. * Constructor with an positive x and y coord on the canvas.
  14. *
  15. * @param x
  16. * int
  17. * @param y
  18. * int
  19. */
  20. public Position(int x, int y) {
  21. this.x = x;
  22. this.y = y;
  23. }
  24. /**
  25. * Default constructor without defined position.
  26. */
  27. public Position() {
  28. this.x = -1;
  29. this.y = -1;
  30. }
  31. }