Skip to content
Snippets Groups Projects
Commit 3459223e authored by David Bergström's avatar David Bergström
Browse files

Add enum Players

parent cd23c6ca
Branches
Tags
No related merge requests found
......@@ -26,6 +26,15 @@ PYBIND11_MODULE(library, m)
.value("Protoss", sc2::Race::Protoss)
.value("Random", sc2::Race::Random);
// Stupid anonymous enum, used as int everywhere. Best work-around I could think of.
py::module players = m.def_submodule("Players", "Constants for referring to players");
players.attr("Self") = (int) Players::Self;
players.attr("Enemy") = (int) Players::Enemy;
players.attr("Neutral") = (int) Players::Neutral;
players.attr("Ally") = (int) Players::Ally;
players.attr("Size") = (int) Players::Size; // These are probably used for
players.attr("None") = (int) Players::None; // creating arrays of fixed length??
/*
TODO: These also needs to be defined
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment