]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/trainai.cpp
TrainAI framework
[r2c2.git] / source / libr2c2 / trainai.cpp
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2011  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #include "train.h"
9 #include "trainai.h"
10
11 using namespace std;
12
13 namespace R2C2 {
14
15 TrainAI::TrainAI(Train &t):
16         train(t)
17 {
18         train.add_ai(*this);
19 }
20
21 TrainAI::~TrainAI()
22 {
23         train.remove_ai(*this);
24 }
25
26 void TrainAI::set_tag(const string &t)
27 {
28         tag = t;
29 }
30
31 } // namespace R2C2