Class Tuple

java.lang.Object
com.klotski.app.Tuple

public class Tuple extends Object
Classe che rappresenta una Tupla (struttura dati) per gestire meglio le coordinate dei Piece.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    Coordinata X
    final int
    Coordinata Y
  • Constructor Summary

    Constructors
    Constructor
    Description
    Tuple(int x, int y)
    Costruttore con parametri che inizializza coordinata "X" e coordinata "Y"
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Metodo che ritorna la posizione "X"
    int
    Metodo che ritorna la posizione "Y"

    Methods inherited from class java.lang.Object

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

    • _x

      public final int _x
      Coordinata X
    • _y

      public final int _y
      Coordinata Y
  • Constructor Details

    • Tuple

      public Tuple(int x, int y)
      Costruttore con parametri che inizializza coordinata "X" e coordinata "Y"
      Parameters:
      x - del pezzo
      y - del pezzo
  • Method Details

    • getX

      public int getX()
      Metodo che ritorna la posizione "X"
      Returns:
      x
    • getY

      public int getY()
      Metodo che ritorna la posizione "Y"
      Returns:
      y