s3games.engine

## Class Move

- java.lang.Object
- - s3games.engine.Move

-     public class Move
      extends java.lang.Object

  Represents a single move made by some player: what was moved, from where, to where

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `element` name of the location to where the element was moved
    `java.lang.String` | `from` name of the element that was moved
    `java.lang.String` | `to` name of the location from where the element was moved

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Move(java.lang.String from, java.lang.String to, java.lang.String element, GameSpecification specs)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object other)` compare for equality taking into account element types and location relevance, i.e.
    `int` | `hashCode()` return a hash code for fast hashmap access
    `java.lang.String` | `toString()` for printing and debugging

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### from

          public final java.lang.String from

      name of the element that was moved

    - #### to

          public final java.lang.String to

      name of the location from where the element was moved

    - #### element

          public final java.lang.String element

      name of the location to where the element was moved

  - ### Constructor Detail

    - #### Move

          public Move(java.lang.String from,
              java.lang.String to,
              java.lang.String element,
              GameSpecification specs)

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      for printing and debugging
      Overrides:
        `toString` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      return a hash code for fast hashmap access
      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object other)

      compare for equality taking into account element types and location relevance, i.e. whether the moves are really different
      Overrides:
        `equals` in class `java.lang.Object`