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.

22 lines
565 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. public:
  11. Controller(Snake* _snake);
  12. Controller();
  13. ~Controller(); //default destructor
  14. graphics_input readInput(void); //basic input methods: sets inpt to what it read if i tread something
  15. int act(void); //basic act method: acts like a joystick
  16. bool wantsToQuit(void); //returns true of the user wants to quit
  17. };