mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-19 20:22:18 +01:00
DroidFish: Fixed bug when exporting time information to PGN data.
This commit is contained in:
@@ -1155,7 +1155,7 @@ public class GameTree {
|
|||||||
|
|
||||||
private final void addExtendedInfo(PgnToken.PgnTokenReceiver out,
|
private final void addExtendedInfo(PgnToken.PgnTokenReceiver out,
|
||||||
String extCmd, String extData) {
|
String extCmd, String extData) {
|
||||||
out.processToken(this, PgnToken.COMMENT, "{[%" + extCmd + " " + extData + "]}");
|
out.processToken(this, PgnToken.COMMENT, "[%" + extCmd + " " + extData + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String getTimeStr(int remainingTime) {
|
private static final String getTimeStr(int remainingTime) {
|
||||||
|
|||||||
@@ -576,6 +576,7 @@ public class GameTreeTest extends TestCase {
|
|||||||
options.exp.playerAction = true;
|
options.exp.playerAction = true;
|
||||||
pgn = gt.toPGN(options);
|
pgn = gt.toPGN(options);
|
||||||
assertTrue(pgn.indexOf("--") >= 0);
|
assertTrue(pgn.indexOf("--") >= 0);
|
||||||
|
assertTrue(pgn.indexOf("1. -- {[%playeraction resign]} 0-1") >= 0);
|
||||||
|
|
||||||
gt = new GameTree(null);
|
gt = new GameTree(null);
|
||||||
gt.readPGN(pgn, options);
|
gt.readPGN(pgn, options);
|
||||||
|
|||||||
Reference in New Issue
Block a user