Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package connect4.model;
- /**
- * Coordinates2D
- */
- public class Coordinates2D {
- /**
- * x coordinate of token.
- */
- private int xCoord = 0;
- /**
- * y coordinate of token.
- */
- private int yCoord = 0;
- /**
- * Method to get x coordinate of token.
- *
- * @return xCoord x coordinate of token.
- */
- public int getXCoord() {
- return xCoord;
- }
- /**
- * Method to get y coordinate of token.
- *
- * @return yCoord y coordinate of token.
- */
- public int getyCoord() {
- return yCoord;
- }
- /**
- * Method to set x coordinate.
- *
- * @param x
- * x coordinate.
- */
- public void setXCoord(int x) {
- this.xCoord = x;
- }
- /**
- * Method to set y coordinate.
- *
- * @param y
- * y coordinate.
- */
- public void setYCoord(int y) {
- this.yCoord = y;
- }
- /**
- * Method to get string representation of witness.
- *
- * @return witnessElement one element of witness.
- */
- public String toString() {
- String witnessElement = "";
- witnessElement = "(" + this.xCoord + ", " + this.yCoord + ")";
- return witnessElement;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement