From e239a984169a6f619f08ae9ad0b3b9b14227509f Mon Sep 17 00:00:00 2001 From: Bam4d Date: Tue, 17 Oct 2023 13:11:23 +0100 Subject: [PATCH] compile fixes --- bindings/python.cpp | 18 +++++++++--------- bindings/wrapper/GDY.cpp | 8 ++++---- bindings/wrapper/GameProcess.cpp | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bindings/python.cpp b/bindings/python.cpp index cf503959..7dc30b26 100644 --- a/bindings/python.cpp +++ b/bindings/python.cpp @@ -3,7 +3,7 @@ #include #include "wrapper/GDY.cpp" -#include "wrapper/GDYReader.cpp" +#include "wrapper/GDYLoader.cpp" #include "wrapper/NumpyWrapper.cpp" namespace py = pybind11; @@ -22,10 +22,10 @@ PYBIND11_MODULE(python_griddly, m) { spdlog::debug("Python Griddly module loaded!"); - py::class_> gdy_reader(m, "GDYReader"); + py::class_> gdy_reader(m, "GDYLoader"); gdy_reader.def(py::init()); - gdy_reader.def("load", &Py_GDYReader::loadGDYFile); - gdy_reader.def("load_string", &Py_GDYReader::loadGDYString); + gdy_reader.def("load", &Py_GDYLoader::loadGDYFile); + gdy_reader.def("load_string", &Py_GDYLoader::loadGDYString); py::class_> gdy(m, "GDY"); gdy.def("set_max_steps", &Py_GDY::setMaxSteps); @@ -106,11 +106,11 @@ PYBIND11_MODULE(python_griddly, m) { game_process.def("seed", &Py_GameProcess::seedRandomGenerator); - py::class_> player(m, "Player"); - player.def("step", &Py_StepPlayerWrapper::stepSingle); - player.def("step_multi", &Py_StepPlayerWrapper::stepMulti); - player.def("observe", &Py_StepPlayerWrapper::observe); - player.def("get_observation_description", &Py_StepPlayerWrapper::getObservationDescription); + py::class_> player(m, "Player"); + player.def("step", &Py_Player::stepSingle); + player.def("step_multi", &Py_Player::stepMulti); + player.def("observe", &Py_Player::observe); + player.def("get_observation_description", &Py_Player::getObservationDescription); py::enum_ observer_type(m, "ObserverType"); observer_type.value("SPRITE_2D", ObserverType::SPRITE_2D); diff --git a/bindings/wrapper/GDY.cpp b/bindings/wrapper/GDY.cpp index d291aade..0178214f 100644 --- a/bindings/wrapper/GDY.cpp +++ b/bindings/wrapper/GDY.cpp @@ -8,8 +8,8 @@ #include "../../src/Griddly/Core/GDY/GDYFactory.hpp" #include "../../src/Griddly/Core/Grid.hpp" #include "../../src/Griddly/Core/TurnBasedGameProcess.hpp" -#include "GameWrapper.cpp" -#include "StepPlayerWrapper.cpp" +#include "GameProcess.cpp" +#include "Player.cpp" namespace griddly { @@ -83,8 +83,8 @@ class Py_GDY { return py_actionInputsDefinitions; } - std::shared_ptr createGame(std::string globalObserverName) { - return std::make_shared(Py_GameWrapper(globalObserverName, gdyFactory_)); + std::shared_ptr createGame(std::string globalObserverName) { + return std::make_shared(Py_GameProcess(globalObserverName, gdyFactory_)); } private: diff --git a/bindings/wrapper/GameProcess.cpp b/bindings/wrapper/GameProcess.cpp index b1c93c68..f20a18d8 100644 --- a/bindings/wrapper/GameProcess.cpp +++ b/bindings/wrapper/GameProcess.cpp @@ -2,7 +2,7 @@ #include "../../src/Griddly/Core/TurnBasedGameProcess.hpp" #include "NumpyWrapper.cpp" -#include "StepPlayerWrapper.cpp" +#include "Player.cpp" #include "WrapperCommon.cpp" namespace griddly {