Commit 0d667ebd authored by mercury233's avatar mercury233

test windbot-server

parent 96af2c32
...@@ -411,23 +411,7 @@ class Room ...@@ -411,23 +411,7 @@ class Room
return return
return return
if @windbot if @windbot
#log.info @windbot request.get "http://127.0.0.1:2399/?name=#{encodeURIComponent(@windbot.name)}&deck=#{encodeURIComponent(@windbot.deck)}&host=127.0.0.1&port=#{@port}&dialog=#{encodeURIComponent(@windbot.dialog)}&version=#{settings.version}"
@ai_process = spawn 'mono', ['WindBot.exe'], {
cwd: 'windbot', env: {
YGOPRO_VERSION: settings.version
YGOPRO_HOST: '127.0.0.1'
YGOPRO_PORT: @port
YGOPRO_NAME: @windbot.name
YGOPRO_DECK: @windbot.deck
YGOPRO_DIALOG: @windbot.dialog
}
}
@ai_process.stdout.on 'data', (data)->
#log.info "AI stdout: " + data
return
@ai_process.stderr.on 'data', (data)->
log.info "AI stderr: " + data
return
return return
@process.stderr.on 'data', (data)=> @process.stderr.on 'data', (data)=>
data = "Debug: " + data data = "Debug: " + data
......
...@@ -562,21 +562,7 @@ ...@@ -562,21 +562,7 @@
}); });
}); });
if (_this.windbot) { if (_this.windbot) {
_this.ai_process = spawn('mono', ['WindBot.exe'], { request.get("http://127.0.0.1:2399/?name=" + (encodeURIComponent(_this.windbot.name)) + "&deck=" + (encodeURIComponent(_this.windbot.deck)) + "&host=127.0.0.1&port=" + _this.port + "&dialog=" + (encodeURIComponent(_this.windbot.dialog)) + "&version=" + settings.version);
cwd: 'windbot',
env: {
YGOPRO_VERSION: settings.version,
YGOPRO_HOST: '127.0.0.1',
YGOPRO_PORT: _this.port,
YGOPRO_NAME: _this.windbot.name,
YGOPRO_DECK: _this.windbot.deck,
YGOPRO_DIALOG: _this.windbot.dialog
}
});
_this.ai_process.stdout.on('data', function(data) {});
_this.ai_process.stderr.on('data', function(data) {
log.info("AI stderr: " + data);
});
} }
}; };
})(this)); })(this));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment