aboutsummaryrefslogtreecommitdiff
path: root/game/entity.cpp
blob: f127150cd98cc35bd819298784b710accbaf0f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
#include "entity.h"
#include <iostream>


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;
}