diff --git a/scripts/update_world.ts b/scripts/update_world.ts new file mode 100644 index 0000000..02a03e7 --- /dev/null +++ b/scripts/update_world.ts @@ -0,0 +1,13 @@ + +import { readFileSync, writeFileSync } from 'fs'; + +function updateWorld() { + const state = JSON.parse(readFileSync('world_state.json', 'utf8')); + state.tower.energy = Math.min(100, state.tower.energy + 5); + state.matrix.stability = Math.min(1.0, state.matrix.stability + 0.01); + state.last_updated = new Date().toISOString(); + writeFileSync('world_state.json', JSON.stringify(state, null, 2)); + console.log('World state updated successfully.'); +} + +updateWorld();