Rev 14 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 12 | freddie | 1 | #ifndef SNAKE_HPP |
| 2 | #define SNAKE_HPP |
||
| 3 | |||
| 4 | enum Direction |
||
| 5 | { |
||
| 13 | tom | 6 | Up, |
| 7 | Down, |
||
| 8 | Left, |
||
| 9 | Right |
||
| 12 | freddie | 10 | }; |
| 11 | |||
| 12 | class Snake |
||
| 13 | { |
||
| 14 | public: |
||
| 15 | Snake(); |
||
| 16 | |||
| 17 | void nextPoint(Point newPoint); |
||
| 14 | freddie | 18 | void move(); |
| 16 | freddie | 19 | void append(int num); |
| 12 | freddie | 20 | |
| 16 | freddie | 21 | // Stuff that should be private - Did I write this comment? (F) |
| 12 | freddie | 22 | vector<Point> points; // list of points snake occupies |
| 23 | |||
| 24 | // Colour Values |
||
| 25 | int R; |
||
| 26 | int G; |
||
| 27 | int B; |
||
| 28 | |||
| 29 | Direction direction; |
||
| 30 | |||
| 16 | freddie | 31 | bool dead; |
| 32 | |||
| 12 | freddie | 33 | }; |
| 34 | |||
| 35 | #endif // SNAKE_HPP |