java.lang.Object
polimi.ingsw.am21.codex.model.Cards.Position
All Implemented Interfaces:
Serializable

public class Position extends Object implements Serializable
Represents a position in the isometric grid The isometric grid is a grid with the following properties:
1. The origin is in the center of the grid
2. The x-axis is oriented to the bottom-right part of the screen
3. The y-axis is oriented to the top-right part of the screen
See Also:
  • Constructor Details

    • Position

      public Position(int x, int y)
    • Position

      public Position()
  • Method Details

    • getX

      public int getX()
    • getY

      public int getY()
    • computeAdjacentPosition

      public Position computeAdjacentPosition(AdjacentPosition adjacentPosition)
      Calculates the position of the given relative offset
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object