Class Move


  • public final class Move
    extends Object
    A move in a puzzle game.
    Author:
    Herbert Praehofer
    • Field Detail

      • from

        public final Pos from
        the from position
      • to

        public final Pos to
        the to position
    • Constructor Detail

      • Move

        private Move​(Pos from,
                     Pos to)
        Private constructor.
        Parameters:
        from - the from position
        to - the to position
    • Method Detail

      • of

        public static Move of​(Pos from,
                              Pos to)
        Creates a move from a position to a position
        Parameters:
        from - the from position
        to - the to position
        Returns:
        the move
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object