1.1 --- a/webidor/src/main/java/cz/xelfi/quoridor/webidor/resources/Games.java Sun Sep 20 22:33:45 2009 +0200
1.2 +++ b/webidor/src/main/java/cz/xelfi/quoridor/webidor/resources/Games.java Sat Sep 26 21:47:02 2009 +0200
1.3 @@ -230,6 +230,10 @@
1.4 GameId id = new GameId(f.getName(), white, black, new Date(f.lastModified()), new Date(f.lastModified()), GameStatus.whiteMove);
1.5 g = new Game(id);
1.6 }
1.7 + int hash = line.indexOf('#');
1.8 + if (hash >= 0) {
1.9 + line = line.substring(0, hash);
1.10 + }
1.11 if (line.equals("finish")) {
1.12 break;
1.13 }
1.14 @@ -241,7 +245,9 @@
1.15 throw new IOException("Too much moves on line: " + line);
1.16 }
1.17 try {
1.18 - g.apply(white, Move.valueOf(moves[0]), null);
1.19 + if (!"...".equals(moves[0])) {
1.20 + g.apply(white, Move.valueOf(moves[0]), null);
1.21 + }
1.22 if (moves.length == 2) {
1.23 g.apply(black, Move.valueOf(moves[1]), null);
1.24 }