Coord.java 353 B

1234567891011121314151617181920212223242526
  1. package pathgame.algorithm;
  2. public class Coord {
  3. private int x, y;
  4. Coord(int x, int y) {
  5. this.x = x;
  6. this.y = y;
  7. }
  8. int getX() {
  9. return x;
  10. }
  11. int getY() {
  12. return y;
  13. }
  14. public void changeX(int x) {
  15. this.x += x;
  16. }
  17. public void changeY(int y) {
  18. this.y += y;
  19. }
  20. }