SS13ArcadeTCP/SS13ArcadeEnv.h

24 lines
615 B
C
Raw Normal View History

2025-01-03 02:49:40 +00:00
#ifndef ARCADE_ENV_H
#define ARCADE_ENV_H
#include <stdbool.h>
struct __attribute__((packed)) State {
int player_hp, player_mp, enemy_hp, enemy_mp, steps;
};
struct __attribute__((packed)) Observation {
struct State state;
int reward;
bool done;
};
struct SS13ArcadeEnv {
int player_hp, player_mp, enemy_hp, enemy_mp, steps;
};
void CreateEnvironment(struct SS13ArcadeEnv* env);
void Step(struct SS13ArcadeEnv* instance, const int action, struct Observation* obs);
void GetState(struct SS13ArcadeEnv* env, struct State* state);
void Reset(struct SS13ArcadeEnv*, struct State* state);
#endif