Class Piece

  • All Implemented Interfaces:
    java.io.Serializable

    public class Piece
    extends java.lang.Object
    implements java.io.Serializable
    A piece for playing.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean is_white
      The piece color (white or black).
    • Constructor Summary

      Constructors 
      Constructor Description
      Piece​(boolean is_white)
      Create a new board.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isWhite()
      Test, if it is a white piece.
      java.lang.String toString()
      Get the string representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • is_white

        protected boolean is_white
        The piece color (white or black).
    • Constructor Detail

      • Piece

        public Piece​(boolean is_white)
        Create a new board.
    • Method Detail

      • isWhite

        public boolean isWhite()
        Test, if it is a white piece.
        Returns:
        True, if it a white piece.
      • toString

        public java.lang.String toString()
        Get the string representation.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation.