Class Coords

java.lang.Object
com.c1games.terminal.algo.Coords

public class Coords
extends java.lang.Object
Two-dimensional, integer coordinates.
  • Field Summary

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

    Constructors 
    Constructor Description
    Coords​(int x, int y)  
  • Method Summary

    Modifier and Type Method Description
    float distance​(Coords other)  
    java.util.List<Coords> neighbors()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

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

    • x

      public int x
    • y

      public int y
  • Constructor Details

    • Coords

      public Coords​(int x, int y)
  • Method Details

    • neighbors

      public java.util.List<Coords> neighbors()
    • toString

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

      public float distance​(Coords other)