package de.movope.game;


public class Move {

    Square from;
    Square to;

    private Move(Square start, Square to) {
        this.from = start;
        this.to = to;
    }

    static public Move create(String from, String to) {
        return new Move(Square.create(from), Square.create(to));
    }

    static public Move create(Square from, Square to) {
        return new Move(from, to);
    }

    public Square getFrom() {
        return from;
    }

    public Square getTo() {
        return to;
    }

    @Override
    public String toString() {
        return "Move{" + from +
                " to=" + to + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Move)) return false;

        Move move = (Move) o;

        if (!from.equals(move.from)) return false;
        if (!to.equals(move.to)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = from.hashCode();
        result = 31 * result + to.hashCode();
        return result;
    }
}

@@ -572,20 +572,16 @@
 return %22
-Move
 %7B%22 + fro
@@ -587,30 +587,12 @@
 om +
-%0A                %22 to=
+ %22-%3E
 %22 + 

clean up