Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Commit

Permalink
1.0.2: Made compatible with CompactChess 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
timmyRS committed Jul 25, 2018
1 parent af632bd commit 93f1f25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sh/hell/compactchess/lichess/LichessBotGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sh.hell.compactchess.engine.Engine;
import sh.hell.compactchess.engine.EngineBuilder;
import sh.hell.compactchess.exceptions.ChessException;
import sh.hell.compactchess.exceptions.InvalidUCINotationException;
import sh.hell.compactchess.exceptions.InvalidMoveException;
import sh.hell.compactchess.game.Color;
import sh.hell.compactchess.game.Game;
import sh.hell.compactchess.game.Move;
Expand Down Expand Up @@ -105,7 +105,7 @@ public void run()
String[] moves = state.get("moves").asString().split(" ");
for(String move : moves)
{
game.move(move).commit();
game.uciMove(move).commit();
}
}
else
Expand Down Expand Up @@ -220,7 +220,7 @@ else if(!obj.get("username").asString().equals(lichessBot.lichessAPI.getProfile(
{
int offset = (moves.length - game.moves.size());
String move = moves[moves.length - offset];
game.move(move).commit();
game.uciMove(move).commit();
}
}
game.whitemsecs = state.get("wtime").asLong();
Expand Down Expand Up @@ -262,7 +262,7 @@ else if(game.whitemsecs <= 120000)
this.lastScore = engine.score;
}
}
catch(InvalidUCINotationException e)
catch(InvalidMoveException e)
{
System.out.println(lichessBot.lichessAPI.baseUrl + "/" + id + " > " + e.getMessage());
}
Expand Down

0 comments on commit 93f1f25

Please sign in to comment.