00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TURTLE_MOBILITY_H
00020 #define TURTLE_MOBILITY_H
00021
00022 #include <stack>
00023 #include "LineSegmentsMobilityBase.h"
00024
00025
00034 class TurtleMobility : public LineSegmentsMobilityBase
00035 {
00036 protected:
00037
00038 cXMLElement *turtleScript;
00039
00040
00041 cXMLElement *nextStatement;
00042 double angle;
00043 BorderPolicy borderPolicy;
00044 std::stack<long> loopVars;
00045
00046 public:
00047
00049 virtual void initialize(int);
00050
00051 protected:
00053 virtual void setTargetPosition();
00054
00056 virtual void fixIfHostGetsOutside();
00057
00059 void resumeScript();
00060
00062 void executeStatement(cXMLElement *nextStatement);
00063
00065 double getValue(const char *s);
00066
00068 void gotoNextStatement();
00069 };
00070
00071 #endif
00072