[LIB-13] Add PGN format classes
[chesshog-scanner.git] / src / main / java / org / hedgecode / chess / scanner / format / Move.java
index 8b9a02e..a4bc9af 100644 (file)
@@ -21,10 +21,15 @@ package org.hedgecode.chess.scanner.format;
  *
  * @author Dmitry Samoshin aka gotty
  */
-public interface Move {
+public interface Move extends Comparable<Move> {
 
-    int number();
+    int ply();
 
     String move();
 
+    @Override
+    default int compareTo(Move move) {
+        return this.ply() - move.ply();
+    }
+
 }