mirror of
https://github.com/UltraCoderRU/screepsxx.git
synced 2026-01-28 01:55:12 +00:00
20 lines
362 B
C++
20 lines
362 B
C++
#include <Screeps/Context.hpp>
|
|
#include <Screeps/Creep.hpp>
|
|
|
|
#include <emscripten.h>
|
|
#include <emscripten/bind.h>
|
|
|
|
EMSCRIPTEN_KEEPALIVE
|
|
extern "C" void loop()
|
|
{
|
|
Screeps::Context::update();
|
|
|
|
auto creeps = Screeps::Game.creeps();
|
|
for (auto& creep : creeps)
|
|
creep.second.say("screepsxx");
|
|
}
|
|
|
|
EMSCRIPTEN_BINDINGS(loop)
|
|
{
|
|
emscripten::function("loop", &loop);
|
|
}
|