From 860c3d31a7db0475fc191a624eec42a0a01082be Mon Sep 17 00:00:00 2001 From: 2ManyProjects Date: Mon, 17 Mar 2025 18:06:28 -0500 Subject: [PATCH] undid engine restart code --- .../ChessEngines/fairy-chess-server/engine.js | 32 +++++++++---------- Systems/Game/Map/MapGenerator.gd | 4 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Assets/ChessEngines/fairy-chess-server/engine.js b/Assets/ChessEngines/fairy-chess-server/engine.js index d72297f..795427b 100644 --- a/Assets/ChessEngines/fairy-chess-server/engine.js +++ b/Assets/ChessEngines/fairy-chess-server/engine.js @@ -29,22 +29,22 @@ class ChessEngine extends EventEmitter { this.engine.on('close', (code) => { console.log('Engine process closed with code:', code); this.isReady = false; - console.log('Attempting to restart engine...'); - // Add a small delay before restarting to avoid rapid restart loops - setTimeout(() => { - this.start() - .then(() => { - // Restore previous state if needed - if (this.currentFen) { - this.setPosition(this.currentFen); - } - this.emit('restarted', { code }); - }) - .catch(err => { - console.error('Failed to restart engine:', err); - this.emit('restart-failed', { error: err }); - }); - }, 1000); + // console.log('Attempting to restart engine...'); + // // Add a small delay before restarting to avoid rapid restart loops + // setTimeout(() => { + // this.start() + // .then(() => { + // // Restore previous state if needed + // if (this.currentFen) { + // this.setPosition(this.currentFen); + // } + // this.emit('restarted', { code }); + // }) + // .catch(err => { + // console.error('Failed to restart engine:', err); + // this.emit('restart-failed', { error: err }); + // }); + // }, 1000); }); // Initialize engine diff --git a/Systems/Game/Map/MapGenerator.gd b/Systems/Game/Map/MapGenerator.gd index 9384062..c72dfc1 100644 --- a/Systems/Game/Map/MapGenerator.gd +++ b/Systems/Game/Map/MapGenerator.gd @@ -552,8 +552,8 @@ func generate_chess_data(node, player): var unit_string = level_unit_distribution[index] var pawn_string = "" var height = 6; - unit_string = level_unit_distribution[level_unit_distribution.size() - 1] - height = 8 + # unit_string = level_unit_distribution[level_unit_distribution.size() - 1] + # height = 8 for x in unit_string.length(): pawn_string += "p"