Fixed an issue with resizing and pacman level, changed ball attracts coins

This commit is contained in:
Renan LE CARO 2025-04-09 09:24:15 +02:00
parent 83b9c0dec5
commit 183a11f989
10 changed files with 1837 additions and 1761 deletions

View file

@ -10,13 +10,11 @@ app.use(bodyParser.text({
}));
app.get('/src/data/levels.json', (req, res) => {
console.log('src/data/levels.json')
res.json(JSON.parse(fs.readFileSync('src/data/levels.json')))
})
app.post('/src/data/levels.json', (req, res) => {
if(req.body?.trim()) {
console.log('Levels updated')
fs.writeFileSync('src/data/levels.json', req.body)
}
res.end('OK')