ELEC2645 (2019/20)
/
ELEC2645_Project_el17oc1
Owen Cavender 201159294
Diff: snake.h
- Revision:
- 8:997f90c88246
- Parent:
- 6:bf90044188d0
- Child:
- 9:a69a6a06dddf
--- a/snake.h Thu May 28 15:08:11 2020 +0000 +++ b/snake.h Thu May 28 18:50:56 2020 +0000 @@ -5,7 +5,6 @@ #include "mbed.h" #include "N5110.h" #include "Gamepad.h" -#include "Apple.h" class Snake @@ -28,31 +27,32 @@ void check_collisions(); - void check_score(N5110 &lcd, Gamepad &pad, Apple &apple, Timer &timer); - + void apple_collected(N5110 &lcd, Gamepad &pad, Timer &timer); - void get_position(Gamepad &pad); - void render(N5110 &lcd, Apple &apple); - void get_LEDs(Gamepad &pad); - void get_timer(Timer &timer); + void render_clear_tail(); + void get_direction(Gamepad &pad); + void move_snake(); + void get_time(Timer &timer); + void render(N5110 &lcd); + + bool get_gameover(); int get_score(); - void print_scores(N5110 &lcd); - void print_display_time(N5110 &lcd); + Vector2D get_Snakehead(); private: + void get_Apple_position(N5110 &lcd); bool _gameover; Directions _direction; int _score; - float _realtime; + float _display_time; int Reset_value; - float _display_time; int _x0;