aboutsummaryrefslogtreecommitdiff
path: root/game/entity.cpp
blob: 85390459d458f579fcc57222b80ace16546c9e0b (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;
}