Skip to content

Commit

Permalink
xboard play hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
En-En-Code committed Mar 22, 2022
1 parent ccc8da0 commit 617724c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/net/animats/chess/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Engine extends Thread {

// This is set to TRUE if the engine is only providing a hint,
// not making a move.
private boolean analysis_only = false;
public boolean analysis_only = false;

Object engineLock = new Object();

Expand Down
3 changes: 2 additions & 1 deletion src/net/animats/chess/XBoardInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class XBoardInterface implements IOInterface {

public void Finished(double _timeTaken, int _movesCalculated, Move _move, int _nodesPerSecond) {
thinking = false;
if (!engine.analysis_only)
System.out.println("move " + _move.AsCommand());
}

public XBoardInterface (Engine _engine) {
Expand Down Expand Up @@ -170,7 +172,6 @@ public void Message(String _message){
* state of the board.
*/
public void MoveMade(Move _move) {
System.out.println("move " + _move.AsCommand());
}

public void SuggestedMove(Move _move) {
Expand Down

0 comments on commit 617724c

Please sign in to comment.