1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #ifndef AGENT_H
- #define AGENT_H
- #include <Agents/Perception/Perception.hpp>
- #include <Environment/PictureEnvironment.hpp>
-
- class Agent
- {
- public:
- Perception fCurrentPerception;
- PictureEnvironment* fEnvironment;
- sf::Color fColor;
- int fDotSize;
- int fMoveSize;
- int fXPos;
- int fYPos;
-
- Agent();
- Agent(PictureEnvironment* iEnvironment, int iDotSize, int iMoveSize);
- virtual void loop();
-
- virtual void move();
- virtual void paint();
- };
-
- class RepaintAgent : public Agent
- {
- public:
- //list of possible movement vectors, to be used to perceive the environment
- std::vector<std::vector<int>> fMovements;
- std::vector<int> fValidMovementIndexes;
- std::vector<int> fCurrentMovement;
-
- RepaintAgent(PictureEnvironment* iEnvironment, int iDotSize, int iMoveSize);
- virtual void loop();
- virtual void move();
- virtual void paint();
-
- protected:
- virtual void init();
- };
-
- class StraightPaintAgent : public RepaintAgent
- {
- public:
- StraightPaintAgent(PictureEnvironment* iEnvironment, int iDotSize, int iMoveSize);
-
- protected:
- virtual void init();
- };
-
- class PullPaintAgent : public RepaintAgent
- {
- public:
- PullPaintAgent(PictureEnvironment* iEnvironment, int iDotSize, int iMoveSize);
- virtual void loop();
- virtual void move();
- };
-
- #endif // AGENT_H
|