Class Point


  • public final class Point
    extends java.lang.Object
    Represents a point on a Goban. The x and y values are directly accessible due to their common, and frequent use.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int x  
      int y  
    • Constructor Summary

      Constructors 
      Constructor Description
      Point()
      Constructs a new point at (0, 0).
      Point​(int newX, int newY)
      Constructs a new point at the given coordinates.
      Point​(Point pt)
      Copy constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • x

        public int x
      • y

        public int y
    • Constructor Detail

      • Point

        public Point()
        Constructs a new point at (0, 0).
      • Point

        public Point​(int newX,
                     int newY)
        Constructs a new point at the given coordinates.
        Parameters:
        newX - - The x portion of this point's coordinate.
        newY - - The y portion of this point's coordinate.
      • Point

        public Point​(Point pt)
        Copy constructor
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • main

        public static void main​(java.lang.String[] args)