add battle-engine.js