]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trainai.h
Don't bother with creating intermediate steps for state updates
[r2c2.git] / source / libr2c2 / trainai.h
index c3e16556e773fc4802abd7aed6b941bec68fc711..b3412c5442e18b3b7fffe4ac516d2b58b9558a2c 100644 (file)
@@ -16,8 +16,6 @@ Base class for train AIs.
 
 AIs can help the user in various ways, ranging from automatically stopping the
 train at the end of allocated track to autonomously running a train.
-
-XXX The timestamp should be removed from tick, but Timetable depends on it
 */
 class TrainAI
 {
@@ -37,17 +35,14 @@ public:
 
 protected:
        Train &train;
-       std::string tag;
 
        TrainAI(Train &);
 public:
        virtual ~TrainAI();
 
-       void set_tag(const std::string &);
-       const std::string &get_tag() const { return tag; }
-
        virtual void message(const Message &) { }
-       virtual void tick(const Msp::Time::TimeStamp &, const Msp::Time::TimeDelta &) { }
+       virtual void tick(const Msp::Time::TimeDelta &) = 0;
+       virtual bool has_intent_to_move() const { return false; }
 };
 
 } // namespace R2C2