mirror of
https://github.com/UltraCoderRU/screepsxx.git
synced 2026-01-28 18:15:12 +00:00
34 lines
582 B
C++
34 lines
582 B
C++
#ifndef SCREEPS_CONTEXT_HPP
|
|
#define SCREEPS_CONTEXT_HPP
|
|
|
|
#include "Game.hpp"
|
|
#include "Memory.hpp"
|
|
#include "PathFinder.hpp"
|
|
#include "RawMemory.hpp"
|
|
|
|
namespace Screeps {
|
|
|
|
class Context
|
|
{
|
|
public:
|
|
static Context& getInstance()
|
|
{
|
|
static Context context;
|
|
return context;
|
|
}
|
|
|
|
static void update()
|
|
{
|
|
Game.setValue(JS::getGlobal("Game"));
|
|
Memory.setValue(JS::getGlobal("Memory"));
|
|
RawMemory.setValue(JS::getGlobal("RawMemory"));
|
|
PathFinder.setValue(JS::getGlobal("PathFinder"));
|
|
}
|
|
|
|
private:
|
|
Context() = default;
|
|
};
|
|
|
|
} // namespace Screeps
|
|
|
|
#endif // SCREEPS_CONTEXT_HPP
|