Skip to content

Commit 176e160

Browse files
committed
Analysis board and move classification
1 parent e7cdc10 commit 176e160

13 files changed

+3231
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
node_modules
3+
engine.exe
4+
_*

LICENSE.txt

+674
Large diffs are not rendered by default.

main.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
3+
4+
const path = require('path');
5+
6+
const { app, BrowserWindow, ipcMain } = require('electron');
7+
const contextMenu = require('electron-context-menu');
8+
9+
const { Engine } = require('./src/engine');
10+
11+
app.whenReady().then(async () => {
12+
contextMenu();
13+
14+
const window = new BrowserWindow({
15+
webPreferences: {
16+
preload: path.join(__dirname, 'src/preload.js'),
17+
},
18+
});
19+
window.maximize();
20+
21+
const move_classification_engine = new Engine('./engine.exe');
22+
ipcMain.handle('evaluate-for-move-classification', async (event, ...args) => move_classification_engine.evaluate(...args));
23+
24+
const live_analysis_engine = new Engine('./engine.exe', (...args) => window.webContents.send('evaluation-callback', ...args));
25+
ipcMain.handle('evaluate-for-live-analysis', async (event, ...args) => live_analysis_engine.evaluate(...args));
26+
27+
await window.loadFile('src/index.html');
28+
});

0 commit comments

Comments
 (0)