Class Location

java.lang.Object
com.amirhn.Game.Location

public class Location extends Object
The type Location.
  • Field Details

    • row

      public final int row
      The Row.
    • column

      public final int column
      The Row.
  • Constructor Details

    • Location

      public Location(int row, int column)
      Instantiates a new Location.
      Parameters:
      row - the row
      column - the column
  • Method Details

    • valueOf

      public static Location valueOf(String loc)
      Value of location.
      Parameters:
      loc - the loc
      Returns:
      the location
    • valueOf

      public static Location valueOf(int row, int column)
      Value of location.
      Parameters:
      row - the row
      column - the column
      Returns:
      the location
    • byOffset

      public Location byOffset(int dx, int dy)
      By offset location.
      Parameters:
      dx - the dx
      dy - the dy
      Returns:
      the location
    • isLight

      public boolean isLight()
      Is light boolean.
      Returns:
      the boolean
    • toString

      public String toString()
      To string string.
      Overrides:
      toString in class Object
      Returns:
      the string
    • equals

      public boolean equals(Object o)
      Equals boolean.
      Overrides:
      equals in class Object
      Parameters:
      o - the o
      Returns:
      the boolean
    • hashCode

      public int hashCode()
      Hash code int.
      Overrides:
      hashCode in class Object
      Returns:
      the int