18 #ifndef INCLUDED_REPLAY
19 #define INCLUDED_REPLAY
43 virtual void Turn(
u32 n,
u32 turnLength,
const std::vector<SimulationCommand>& commands) = 0;
48 virtual void Hash(
const std::string& hash,
bool quick) = 0;
73 virtual void Turn(
u32 n,
u32 turnLength,
const std::vector<SimulationCommand>& commands);
74 virtual void Hash(
const std::string& hash,
bool quick);
90 void Load(
const std::string& path);
97 #endif // INCLUDED_REPLAY
virtual void StartGame(const CScriptValRooted &attribs)
Started the game with the given game attributes.
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
virtual void Turn(u32 n, u32 turnLength, const std::vector< SimulationCommand > &commands)=0
Run the given turn with the given collection of player commands.
virtual void Hash(const std::string &hash, bool quick)
Optional hash of simulation state (for sync checking).
Replay log recorder interface.
CReplayLogger(ScriptInterface &scriptInterface)
void Load(const std::string &path)
Simulation command, typically received over the network in multiplayer games.
virtual void Hash(const std::string &hash, bool quick)=0
Optional hash of simulation state (for sync checking).
virtual void Turn(u32 n, u32 turnLength, const std::vector< SimulationCommand > &commands)
Run the given turn with the given collection of player commands.
ScriptInterface & m_ScriptInterface
virtual void Hash(const std::string &hash, bool quick)
Optional hash of simulation state (for sync checking).
NONCOPYABLE(CReplayLogger)
virtual void StartGame(const CScriptValRooted &attribs)=0
Started the game with the given game attributes.
Abstraction around a SpiderMonkey JSContext.
virtual void Turn(u32 n, u32 turnLength, const std::vector< SimulationCommand > &commands)
Run the given turn with the given collection of player commands.
Implementation of IReplayLogger that saves data to a file in the logs directory.
Implementation of IReplayLogger that simply throws away all data.
virtual void StartGame(const CScriptValRooted &attribs)
Started the game with the given game attributes.