hacking-robot / node-uci

Build and run chess UCI engines written in NodeJs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-uci

Write UCI chess engines in NodeJs and run them inside a terminal or browser.

Prerequisites

Node >= 8.0

Install

npm init
npm install @chesscode/node-uci

Run

node node_modules/\@chesscode/node-uci/index.js your_script.js

Example

node node_modules/\@chesscode/node-uci/index.js node_modules/\@chesscode/node-uci/example/index.js

Build for browser usage

If you want to run your engine inside a browser.

cd builder/
./browser.sh ../example/Engine.js > ../example_browser/engine.js 

Then use this js commands in the browser:

window.engine.process.stdout.on('data',function(data) {
console.log(data);
});

window.engine.process.stdin.push("uci\n");
window.engine.process.stdin.push("isready\n");
window.engine.process.stdin.push("go\n");

About

Build and run chess UCI engines written in NodeJs

License:MIT License


Languages

Language:JavaScript 99.8%Language:HTML 0.2%Language:Shell 0.1%