less obsolete output in fix_tiles script

This commit is contained in:
Zutatensuppe 2020-12-24 14:00:21 +01:00
parent a02023db71
commit 709f90b5cf

View file

@ -10,14 +10,14 @@ function fix_tiles(gameId) {
if (tile.owner === -1) { if (tile.owner === -1) {
const p = GameCommon.getFinalTilePos(gameId, tile.idx) const p = GameCommon.getFinalTilePos(gameId, tile.idx)
if (p.x === tile.pos.x && p.y === tile.pos.y) { if (p.x === tile.pos.x && p.y === tile.pos.y) {
console.log('all good', tile.pos) // console.log('all good', tile.pos)
} else { } else {
console.log('bad tile pos', tile.pos, 'should be: ', p) console.log('bad tile pos', tile.pos, 'should be: ', p)
tile.pos = p tile.pos = p
GameCommon.setTile(gameId, tile.idx, tile) GameCommon.setTile(gameId, tile.idx, tile)
changed = true changed = true
} }
} else { } else if (tile.owner !== 0) {
tile.owner = 0 tile.owner = 0
console.log('unowning tile', tile.idx) console.log('unowning tile', tile.idx)
GameCommon.setTile(gameId, tile.idx, tile) GameCommon.setTile(gameId, tile.idx, tile)