Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. package connect4.model;
  2.  
  3. /**
  4. * Coordinates2D
  5. */
  6. public class Coordinates2D {
  7.  
  8. /**
  9. * x coordinate of token.
  10. */
  11. private int xCoord = 0;
  12.  
  13. /**
  14. * y coordinate of token.
  15. */
  16. private int yCoord = 0;
  17.  
  18. /**
  19. * Method to get x coordinate of token.
  20. *
  21. * @return xCoord x coordinate of token.
  22. */
  23. public int getXCoord() {
  24. return xCoord;
  25. }
  26.  
  27. /**
  28. * Method to get y coordinate of token.
  29. *
  30. * @return yCoord y coordinate of token.
  31. */
  32. public int getyCoord() {
  33. return yCoord;
  34. }
  35.  
  36. /**
  37. * Method to set x coordinate.
  38. *
  39. * @param x
  40. * x coordinate.
  41. */
  42. public void setXCoord(int x) {
  43. this.xCoord = x;
  44. }
  45.  
  46. /**
  47. * Method to set y coordinate.
  48. *
  49. * @param y
  50. * y coordinate.
  51. */
  52. public void setYCoord(int y) {
  53. this.yCoord = y;
  54. }
  55.  
  56. /**
  57. * Method to get string representation of witness.
  58. *
  59. * @return witnessElement one element of witness.
  60. */
  61. public String toString() {
  62. String witnessElement = "";
  63. witnessElement = "(" + this.xCoord + ", " + this.yCoord + ")";
  64. return witnessElement;
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement