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.

25 lines
660 B

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