Skip to content

Commit

Permalink
Added support for chess.com PGN tags
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfraam committed Apr 7, 2023
1 parent 731aa9f commit f10482c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/github/wolfraam/chessgame/move/Move.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public int hashCode() {

@Override
public String toString() {
return from.name + "-" + to.name + ((promotion == null ? "" : (" " + promotion.name())));
return from.name + "-" + to.name + (promotion == null ? "" : (" " + promotion.name()));
}
}
12 changes: 11 additions & 1 deletion src/main/java/io/github/wolfraam/chessgame/pgn/PgnTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ public enum PgnTag {
ECO("ECO"),
TIME_CONTROL("TimeControl"),
TERMINATION("Termination"),
CURRENT_POSITION("CurrentPosition"),
TIMEZONE("Timezone"),
ECO_URL("ECOUrl"),
UTC_DATE("UTCDate"),
UTC_TIME("UTCTime"),
START_TIME("StartTime"),
END_DATE("EndDate"),
END_TIME("EndTime"),
LINK("Link"),
OPENING("Opening"),
VARIATION("Variation"),
FEN("FEN"),
Expand All @@ -47,4 +56,5 @@ public enum PgnTag {
public String getTag() {
return tag;
}
}
}

0 comments on commit f10482c

Please sign in to comment.