blob: 37d5d7e4ef6a14b15a7fc5dc42d7a518b0d0c141 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "move_string_mapper.h"
#include "move.h"
#include <map>
#include <string>
MoveStringMapper::MoveStringMapper()
{
moveMap[Move::NOTHING] = "Nothing";
moveMap[Move::MOVE_LEFT] = "MoveLeft";
moveMap[Move::MOVE_RIGHT] = "MoveRight";
moveMap[Move::SHOOT] = "Shoot";
moveMap[Move::BUILD_ALIEN_FACTORY] = "BuildAlienFactory";
moveMap[Move::BUILD_MISSILE_CONTROLLER] = "BuildMissileController";
moveMap[Move::BUILD_SHIELD] = "BuildShield";
}
std::string MoveStringMapper::toString(const Move &move)
{
return moveMap[move];
}
|