#include #include #include #include #include #include #include "Constants.hpp" #include "Engine.hpp" #include "Structures/Spawn.hpp" EMSCRIPTEN_KEEPALIVE extern "C" void loop() { Screeps::Context::update(); JS::console.log(std::string("\n\n\n\n\n\n\n\n\n")); JS::console.log(std::string("Processing tick:\t") + std::to_string(Screeps::Game.time())); { DouwcoHivemind::Engine engine; engine.loop(); } JS::console.log("Used CPU:\t" + std::to_string(Screeps::Game.cpuGetUsed())); JS::console.log("Bucket:\t" + std::to_string(static_cast(Screeps::Game.cpu()["bucket"]))); } EMSCRIPTEN_BINDINGS(loop) { emscripten::function("loop", &loop); }