Class Move

  • All Implemented Interfaces:
    java.io.Serializable

    public class Move
    extends java.lang.Object
    implements java.io.Serializable
    A move consisting of a start and an end point.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Position end
      The end position.
      protected Position start
      The start position.
    • Constructor Summary

      Constructors 
      Constructor Description
      Move​(Position start, Position end)
      Create a position.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Test if two positions are equal.
      Position getEnd()
      Get the target.
      Position getStart()
      Get the start.
      int hashCode()
      Calculate the hash code.
      boolean isJumpMove()
      Test if it is a jump move.
      java.lang.String toString()
      Get the string representation.
      • Methods inherited from class java.lang.Object

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

      • start

        protected Position start
        The start position.
      • end

        protected Position end
        The end position.
    • Constructor Detail

    • Method Detail

      • getStart

        public Position getStart()
        Get the start.
      • getEnd

        public Position getEnd()
        Get the target.
      • isJumpMove

        public boolean isJumpMove()
        Test if it is a jump move.
      • equals

        public boolean equals​(java.lang.Object o)
        Test if two positions are equal.
        Overrides:
        equals in class java.lang.Object
        Returns:
        True, if equal.
      • hashCode

        public int hashCode()
        Calculate the hash code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code.
      • toString

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