Skip to content
Snippets Groups Projects
Commit 9a301f5b authored by Carry Morgane's avatar Carry Morgane
Browse files

Created Position constructor

parent 0b1c2454
No related branches found
No related tags found
No related merge requests found
package model;
public class Position {
private int x;
private int y;
public Position(int x, int y) {
this.x=x;
this.y=y;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public boolean equals(Position p) {
return ( this.getX()==p.getX() && this.getY()==p.getY());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment