diff options
Diffstat (limited to 'game/entity.cpp')
-rw-r--r-- | game/entity.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/game/entity.cpp b/game/entity.cpp index 8362c40..f127150 100644 --- a/game/entity.cpp +++ b/game/entity.cpp @@ -1,3 +1,11 @@ #include "entity.h" #include <iostream> -;
\ No newline at end of file + + +int EntityClass::from_string (std::string str) { + if (str == "inf") return EntityInfo::Class::inf; + if (str == "cav") return EntityInfo::Class::cav; + if (str == "ran") return EntityInfo::Class::ran; + if (str == "sie") return EntityInfo::Class::sie; + if (str == "bld") return EntityInfo::Class::bld; +}
\ No newline at end of file |