Module app

Class MinesweeperPiece

java.lang.Object
app.minesweeper.MinesweeperPiece
All Implemented Interfaces:
Piece

public class MinesweeperPiece extends Object implements Piece
  • Field Details

  • Constructor Details

  • Method Details

    • getPosition

      public Field getPosition()
      Specified by:
      getPosition in interface Piece
      Returns:
      position this piece is located at
    • isAlive

      public boolean isAlive()
      Specified by:
      isAlive in interface Piece
      Returns:
      true if piece is still in game, false otherwise
    • getPlayer

      public int getPlayer()
      Specified by:
      getPlayer in interface Piece
      Returns:
      id of player that can play with this piece
    • getKind

      public MinesweeperPieceKind getKind()
    • isCovered

      public boolean isCovered()
    • isFlagged

      public boolean isFlagged()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object