Module org.example

Class Spot

java.lang.Object
cz.cvut.fel.pjv.model.Spot
All Implemented Interfaces:
java.io.Serializable

public class Spot
extends java.lang.Object
implements java.io.Serializable
Represent a cell on the chess board
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor Description
    Spot​(Piece piece, int x, int y)
    Create object of spot
    Spot​(Spot spot)  
  • Method Summary

    Modifier and Type Method Description
    Piece getPiece()  
    int getX()  
    int getY()  
    boolean isSpotNull()
    If the spot is empty, return true
    void setPiece​(Piece piece)  
    void setX​(int x)  
    void setY​(int y)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Spot

      public Spot​(Piece piece, int x, int y)
      Create object of spot
      Parameters:
      piece -
      x -
      y -
    • Spot

      public Spot​(Spot spot)
  • Method Details

    • getPiece

      public Piece getPiece()
    • getX

      public int getX()
    • getY

      public int getY()
    • setPiece

      public void setPiece​(Piece piece)
    • isSpotNull

      public boolean isSpotNull()
      If the spot is empty, return true
      Returns:
    • setX

      public void setX​(int x)
    • setY

      public void setY​(int y)