You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
723 B

  1. #pragma once
  2. #include "../input-output/Graphics.h"
  3. #include "../components/Snake.h"
  4. #include "../components/Point.h"
  5. #define DEFEAT -1
  6. class Controller{
  7. private:
  8. Snake *snake; //the figure the controler controls
  9. Point snack;
  10. graphics_input inpt;
  11. unsigned int currentScore;
  12. public:
  13. Controller(Snake* _snake);
  14. Controller();
  15. ~Controller(); //default destructor
  16. unsigned int getCurrScore(void);
  17. void resetScore(void);
  18. graphics_input readInput(void); //basic input methods: sets inpt to what it read if i tread something
  19. int act(void); //basic act method: acts like a joystick
  20. bool wantsToQuit(void); //returns true of the user wants to quit
  21. };