diff --git a/pytron b/pytron index 5d1c964..28e8aae 160000 --- a/pytron +++ b/pytron @@ -1 +1 @@ -Subproject commit 5d1c96407b665e138784431cf0046537065bfaee +Subproject commit 28e8aae4ee2b582cbabad44484e05a50ded0bd0f diff --git a/pytron_run/run.py b/pytron_run/run.py index a7f8a64..40425b2 100755 --- a/pytron_run/run.py +++ b/pytron_run/run.py @@ -4,7 +4,7 @@ import sys import json import random random.seed() -sys.path.append('pytron') +sys.path.append('../pytron') from tron.map import Map from tron.game import Game, PositionPlayer diff --git a/server.js b/server.js index 0346026..493d4aa 100644 --- a/server.js +++ b/server.js @@ -32,7 +32,7 @@ function runPython() { } process.stdout.write('\n'); - let p = spawn(pythonPath, ['pytron_run/run.py']); + let p = spawn(pythonPath, ['run.py'], {cwd: 'pytron_run'}); p.stdout.on('data', (data) => { let content = data.toString().split('\n'); for (let line of content) { @@ -107,7 +107,7 @@ function startServer() { app.use(fileUpload()); app.get('/', (req, res) => { - fs.readFile('assets/data.json', 'utf-8', (err, data) => { + fs.readFile('pytron_run/assets/data.json', 'utf-8', (err, data) => { if (err != null) { console.log(err); }