Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- class Lemming
- {
- public:
- Lemming(int ID, int x, int y);
- ~Lemming();
- int getX();
- int getY();
- int getdirectionX();
- int getdirectionY();
- void setX(int x);
- void setY(int y);
- void setdirectionX(int dirX);
- void setdirectionY(int dirY);
- private:
- int ID;
- int posx, posy;
- bool safe;
- bool alive;
- bool spawned;
- int directionX;
- int directionY;
- };
- inline Lemming::Lemming(int ID, int x, int y) : ID(ID), posx(x), posy(y), safe(false), alive(true), spawned(true), directionX(0), directionY(1){};
- inline int Lemming ::getX() { return posx; };
- inline int Lemming::getY() { return posy; };
- inline void Lemming::setX(int x) { posx = x; };
- inline void Lemming::setY(int y) { posy = y; };
- inline int Lemming::getdirectionX() { return directionX; };
- inline int Lemming::getdirectionY() { return directionY; };
- inline void Lemming :: setdirectionX(int dirX) { directionX = dirX; };
- inline void Lemming::setdirectionY(int dirY) { directionY = dirY; };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement