Skip to content

Commit

Permalink
also use syzygy in lost positions
Browse files Browse the repository at this point in the history
  • Loading branch information
supertorpe committed Apr 29, 2024
1 parent 50a5169 commit 6ff8304
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions code/src/controllers/position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ class PositionController extends BaseController {
private chess: ChessInstance = Chess();
private board!: Api;
private boardConfig!: Config;
//private endgameDatabase!: EndgameDatabase;
//private categories!: Category[];
private position!: Position;
private fen!: string;
private idxCategory: { value: number } = Alpine.reactive({ value: -1 });
Expand Down Expand Up @@ -889,7 +887,7 @@ class PositionController extends BaseController {
.then(response => response.json().then(data => {
if (!this.waitingForOpponent.value) return;
// stockfish search more interesting lines when there aren't any winning line
if (data.category == 'loss' || (data.category == 'draw' && data.moves.every((move: { category: string }) => move.category === "draw"))) {
if (/*data.category == 'loss' || */(data.category == 'draw' && data.moves.every((move: { category: string }) => move.category === "draw"))) {
this.getStockfishMove();
} else {
const bestmove = data.moves[0].uci;
Expand Down

0 comments on commit 6ff8304

Please sign in to comment.