git.hedgecode.org
/
chesshog-scanner.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[LIB-13] Add PGN format classes
[chesshog-scanner.git]
/
src
/
main
/
java
/
org
/
hedgecode
/
chess
/
scanner
/
format
/
Move.java
diff --git
a/src/main/java/org/hedgecode/chess/scanner/format/Move.java
b/src/main/java/org/hedgecode/chess/scanner/format/Move.java
index
8b9a02e
..
a4bc9af
100644
(file)
--- a/
src/main/java/org/hedgecode/chess/scanner/format/Move.java
+++ b/
src/main/java/org/hedgecode/chess/scanner/format/Move.java
@@
-21,10
+21,15
@@
package org.hedgecode.chess.scanner.format;
*
* @author Dmitry Samoshin aka gotty
*/
*
* @author Dmitry Samoshin aka gotty
*/
-public interface Move {
+public interface Move
extends Comparable<Move>
{
- int
number
();
+ int
ply
();
String move();
String move();
+ @Override
+ default int compareTo(Move move) {
+ return this.ply() - move.ply();
+ }
+
}
}