Snake
Dependencies: mbed
Fork of el17x2l by
Snake.h
00001 #ifndef SNAKE_H 00002 #define SNAKE_H 00003 00004 #include "Body.h" 00005 #include "mbed.h" 00006 #include "N5110.h" 00007 #include "Gamepad.h" 00008 //#include "Menu.h" 00009 00010 class Snake 00011 { 00012 public: 00013 00014 Snake(); 00015 ~Snake(); 00016 00017 void grow(); 00018 void update(Gamepad &pad); 00019 void move(N5110 &lcd); 00020 void addcurr(); 00021 void backcurr(); 00022 void draw(N5110 &lcd); 00023 const int& getdir(); 00024 const int&getlength(); 00025 const Body * gethead(); 00026 const Body * gettail(); 00027 const Body * getcurr(); 00028 //void add_score(); 00029 //int get_score(); 00030 00031 00032 private: 00033 00034 Body * head; 00035 Body * tail; 00036 Body * curr; 00037 int length; 00038 int direction; 00039 int _height; 00040 int _width; 00041 //int score_v; 00042 //int _score; 00043 00044 //Menu _menu; 00045 00046 }; 00047 #endif
Generated on Tue Jul 26 2022 09:08:54 by
1.7.2
