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.

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